001// ______________________________________________________
002// Generated by sql2java - https://github.com/10km/sql2java-2-6-7 (custom branch) 
003// modified by guyadong from
004// sql2java original version https://sourceforge.net/projects/sql2java/ 
005// JDBC driver used at code generation time: com.mysql.jdbc.Driver
006// template: base.bean.java.vm
007// ______________________________________________________
008package net.gdface.facelog.db;
009
010/**
011 * @author guyadong
012 *
013 * @param <B>
014 *
015 */
016public interface BaseBean <B> {
017    /**
018     * Determines if the current object is new.
019     *
020     * @return true if the current object is new, false if the object is not new
021     */
022    public boolean isNew();
023    /**
024     * Specifies to the object if it has been set as new.
025     *
026     * @param isNew the boolean value to be assigned to the isNew field
027     */
028    public void isNew(boolean isNew);
029
030    /**
031     * Determines if the object has been modified since the last time this method was called.<br>
032     * We can also determine if this object has ever been modified since its creation.
033     *
034     * @return true if the object has been modified, false if the object has not been modified
035     */
036    public boolean isModified();
037    /**
038     * Resets the object modification status to 'not modified'.
039     */
040    public void resetIsModified();
041    /**
042     * Resets the primary keys modification status to 'not modified'.
043     */
044    public void resetPrimaryKeysModified();
045    /**
046     * Determines if the {@code columnID} has been initialized.<br>
047     * It is useful to determine if a field is null on purpose or just because it has not been initialized.
048     * @param columnID column id
049     * @return true if the field has been initialized, false otherwise
050     */
051    public boolean isInitialized(int columnID);
052    /**
053     * Determines if the {@code column} has been modified.
054     * @param columnID column id
055     * @return true if the field has been modified, false if the field has not been modified
056     */
057    public boolean isModified(int columnID);
058    /**
059     * Determines if the {@code column} has been initialized.<br>
060     * It is useful to determine if a field is null on purpose or just because it has not been initialized.
061     * @param column column name
062     * @return true if the field has been initialized, false otherwise
063     */
064    public boolean isInitialized(String column);
065    /**
066     * Determines if the {@code column} has been modified.
067     * @param column column name
068     * @return true if the field has been modified, false if the field has not been modified
069     */
070    public boolean isModified(String column);
071    /**
072     * Copies the passed bean into the current bean.
073     *
074     * @param bean the bean to copy into the current bean
075     * @return always {@code bean}
076     */
077    public B copy(B bean);
078    /**
079     * Copies the passed bean into the current bean.
080     *
081     * @param bean the bean to copy into the current bean
082     * @param fieldList the column id list to copy into the current bean
083     * @return always {@code bean}
084     */
085    public B copy(B bean, int... fieldList);
086    /**
087     * Copies the passed bean into the current bean.
088     *
089     * @param bean the bean to copy into the current bean
090     * @param fieldList the column name list to copy into the current bean
091     * @return always {@code bean}
092     */
093    public B copy(B bean, String... fieldList);
094    /**
095     * 
096     * @param columnID column id
097     * @return return a object representation of the given column id
098     */
099    public <T> T getValue(int columnID);
100    /**
101     * set a value representation of the given column id
102     * @param columnID column id
103     * @param value
104     */
105    public <T> void setValue(int columnID,T value);
106    /**
107     * 
108     * @param column column name
109     * @return return a object representation of the given field
110     */
111    public <T> T getValue(String column);
112    /**
113     * set a value representation of the given field
114     * @param column column name
115     * @param value
116     */
117    public <T> void setValue(String column,T value);
118    /**
119     * @param notNull output not null field only if {@code true}
120     * @param fullIfStringOrBytes for string or bytes field,output full content if {@code true},otherwise output length.
121     * @return Returns a string representation of the object
122     */
123    public String toString(boolean notNull, boolean fullIfStringOrBytes);
124}