@ClassId(value=4) @TableName(value="prefkey") public class DbPreferencesKey extends AbstractDbObject<DbPreferencesKey>
| Modifier and Type | Field and Description |
|---|---|
static String |
CN_KEY
database column name for 'key'.
|
static String |
CN_NODEID
database column name for 'nodeId'.
|
static String |
CN_VALUE
database column name for 'value'.
|
static String |
TABLENAME
the database tablename.
|
AN_CLASSID, AN_ID, AN_SERIAL, AN_TABLESERIAL, CN_CLASSID, CN_ID, CN_SERIAL, CN_TABLESERIAL, idComparator, nameComparator, nameIdComparator, preparePending, TX_DELETE_LIST, TX_DELETE_MISSING_IN_LIST, TX_DELETE_OBJECT, TX_DUMMY_UPDATE, TX_INSERT_OBJECT, TX_INSERT_PLAIN, TX_SAVE, TX_SAVE_LIST, TX_SYNC, TX_UPDATE_OBJECT, TX_UPDATE_PLAIN, TX_UPDATE_SERIAL, TX_UPDATE_SERIAL_AND_TABLESERIAL, TX_UPDATE_TABLESERIAL| Constructor and Description |
|---|
DbPreferencesKey()
Creates a preferences key (without db connection).
|
DbPreferencesKey(Db db)
Creates a preferences key.
|
| Modifier and Type | Method and Description |
|---|---|
String |
createInsertSql()
Creates the SQL code for the insert statement.
|
String |
createUpdateSql()
Creates the SQL code for the update statement.
|
int |
deleteByNodeId(long nodeId)
Deletes all keys for a node.
|
DbObjectClassVariables<DbPreferencesKey> |
getClassVariables()
Gets the some attributes and variables common to all objects of the same class.
|
void |
getFields(ResultSetWrapper rs)
Retrieves the values of all fields.
|
String |
getKey()
Gets the attribute key.
|
DbPreferencesNode |
getLazyNode() |
long |
getNodeId()
Gets the attribute nodeId.
|
String |
getValue()
Gets the attribute value.
|
boolean |
isCountingModification(char modType)
Determines whether modifications of this object are counted in the modification table.
Counting is also turned on if the PDO provides a tableserial. |
boolean |
isTableSerialProvided()
Object provides the tableserial.
|
boolean |
isTracked()
Overridden cause of "--tracked".
|
void |
prepareSetFields()
Prepares the object's attributes before the object is saved to the database.
The default implementation does nothing. |
List<DbPreferencesKey> |
selectByNodeId(long nodeId)
Gets all keys belonging to a node.
|
DbPreferencesKey |
selectByNodeIdKey(long nodeId,
String key)
Get a preferences key by nodeid and key name.
|
int |
setFields(PreparedStatementWrapper st)
Sets the values of all fields (all columns of the database table)
in the given
PreparedStatementWrapper from the object's attributes. |
void |
setKey(String key)
Sets the attribute key.
|
void |
setLazyNode(DbPreferencesNode node)
sets the "lazy" parent, i.e.
|
void |
setNodeId(long nodeId)
Sets the attribute nodeId.
|
void |
setValue(String value)
Sets the attribute value.
|
String |
toString()
Gets the default string value.
The default implementation invokes AbstractDbObject.toGenericString(). |
acceptPersistenceVisitor, addPropertyChangeListener, addPropertyChangeListener, assertMutable, assertNotNew, assertNotOverloaded, assertNotRemote, assertNumberOfRowsAffected, assertPersistable, assertRemote, assertThisRowAffected, attributesModified, beginTx, clearOnRemoteSave, clone, compareTo, copyToDb, countModification, createAttributesInSnapshot, createDeleteAllSql, createDeleteSql, createDummyUpdateSql, createModificationLog, createPreparedStatement, createPreparedStatement, createSelectAllByIdInnerSql, createSelectAllIdSerialInnerSql, createSelectAllInnerSql, createSelectExpiredTableSerials1Sql, createSelectExpiredTableSerials2Sql, createSelectIdInnerSql, createSelectMaxIdSql, createSelectMaxTableSerialSql, createSelectSerialSql, createSelectSql, createSqlUpdate, createUpdateSerialAndTableSerialSql, createUpdateSerialSql, deleteImpl, deleteObject, deletePlain, deleteReferencedRelations, deleteReferencingRelations, differsPersisted, dummyUpdate, equals, finishModification, finishNotUpdated, firePropertyChange, getBackend, getClassBaseName, getClassId, getColumnCount, getExpirationBacklog, getExpiredTableSerials, getId, getIdSource, getImmutableLoggingLevel, getModificationCount, getModificationLog, getPreparedStatement, getPreparedStatement, getPropertyChangeListeners, getPropertyChangeListeners, getRemoteDelegate, getSerial, getSession, getSessionHolder, getTableName, getTableSerial, hashCode, initModification, insertImpl, insertObject, insertPlain, isDeleted, isEntity, isIdValid, isImmutable, isLoggingModification, isModified, isNew, isOverloadable, isPersistable, isReferenced, isRemovable, isSessionImmutable, isStatementAlwaysPrepared, isUpdateNecessary, isUpdatingSerialEvenIfNotModified, isVirgin, loadLazyReferences, logModification, markDeleted, newId, newInstance, newInstance, newInstance, persistObject, prepareDelete, prepareSave, readFromResultSetWrapper, reloadLockedObject, reloadObject, removeAllPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener, reserveId, resultAllIdSerial, resultAllObjects, revertAttributesToSnapshot, saveObject, saveReferencedRelations, saveReferencingRelations, selectAllIdSerial, selectAllObjects, selectExpiredTableSerials, selectExpiredTableSerials, selectLockedObject, selectMaxId, selectMaxTableSerial, selectNextObject, selectObject, selectSerial, setClassId, setId, setImmutable, setImmutableLoggingLevel, setModificationLog, setModified, setOverloadable, setSerial, setSession, setSessionHolder, setSessionImmutable, setStatementAlwaysPrepared, setTableSerial, toGenericString, toIdString, unmarkDeleted, updateImpl, updateObject, updatePlain, updateSerial, updateSerialAndTableSerialpublic static final String TABLENAME
public static final String CN_NODEID
public static final String CN_KEY
public static final String CN_VALUE
public DbPreferencesKey(Db db)
db - the db connectionpublic DbPreferencesKey()
public String toString()
AbstractDbObjectAbstractDbObject.toGenericString().toString in class AbstractDbObject<DbPreferencesKey>public boolean isCountingModification(char modType)
AbstractDbObjectisCountingModification in class AbstractDbObject<DbPreferencesKey>modType - is one of the modtypes INSERT, UPDATE, DELETE, ...public void setLazyNode(DbPreferencesNode node)
node - the parent node, null if none.public DbPreferencesNode getLazyNode()
public void prepareSetFields()
Overridden to set the parent id if lazy parent set and has no id
prepareSetFields in class AbstractDbObject<DbPreferencesKey>public DbObjectClassVariables<DbPreferencesKey> getClassVariables()
AbstractDbObjectDbObjectClassVariables.getClassVariables in class AbstractDbObject<DbPreferencesKey>public List<DbPreferencesKey> selectByNodeId(long nodeId)
nodeId - the node's IDpublic DbPreferencesKey selectByNodeIdKey(long nodeId, String key)
nodeId - the node IDkey - the key namepublic int deleteByNodeId(long nodeId)
nodeId - the node's IDpublic boolean isTableSerialProvided()
isTableSerialProvided in class AbstractDbObject<DbPreferencesKey>public boolean isTracked()
isTracked in class AbstractDbObject<DbPreferencesKey>public void getFields(ResultSetWrapper rs)
AbstractDbObjectgetFields in class AbstractDbObject<DbPreferencesKey>rs - the result setpublic int setFields(PreparedStatementWrapper st)
AbstractDbObjectPreparedStatementWrapper from the object's attributes.setFields in class AbstractDbObject<DbPreferencesKey>st - the statementpublic String createInsertSql()
AbstractDbObjectcreateInsertSql in class AbstractDbObject<DbPreferencesKey>public String createUpdateSql()
AbstractDbObjectcreateUpdateSql in class AbstractDbObject<DbPreferencesKey>public long getNodeId()
public void setNodeId(long nodeId)
nodeId - ID of the preferences nodepublic String getKey()
public void setKey(String key)
key - name of the keypublic String getValue()
public void setValue(String value)
value - value of the keyCopyright © 2016 Krake Softwaretechnik. All rights reserved.