public class DbModification extends AbstractDbObject<DbModification>
| Modifier and Type | Field and Description |
|---|---|
static String |
CN_TRACKEDNAME
database column name for 'trackedName'.
|
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 |
|---|
DbModification()
Creates an empty modification object.
|
DbModification(Db db)
Creates an empty modification object.
|
DbModification(Db db,
String trackedName)
Creates a modification object for a given tablename.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToModificationTable(boolean tableExists,
String tableSerialTableName)
Adds an entry for this counter (== database object class)
to the modification table.
|
int |
countModification(long count)
Counts modifications.
Adds the count to the table's entry and the master entry. |
String |
createInsertSql()
Creates the SQL code for the insert statement.
|
String |
createUpdateSql()
Creates the SQL code for the update statement.
|
DbObjectClassVariables<DbModification> |
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 |
getTrackedName()
Gets the attribute trackedName.
|
static void |
initializeModificationTable(Db db)
Initializes the modification table.
|
long |
refresh()
Refreshes the contents of this modification entry by its name.
|
IdSerialTuple |
selectIdSerial(String tableName)
Selects the id and serial by tablename.
|
long |
selectMasterSerial()
Reads the master-serial.
|
String |
selectTableNameForId(long id)
Selects the tablename for a given ID.
|
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 |
setTrackedName(String trackedName)
Sets the attribute trackedName.
|
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, createDeleteAllSql, createDeleteSql, createDummyUpdateSql, createModificationLog, createPreparedStatement, createPreparedStatement, createSelectAllByIdInnerSql, createSelectAllIdSerialInnerSql, createSelectAllInnerSql, createSelectExpiredTableSerials1Sql, createSelectExpiredTableSerials2Sql, createSelectIdInnerSql, createSelectMaxIdSql, createSelectMaxTableSerialSql, createSelectSerialSql, createSelectSql, createSqlUpdate, createUpdateSerialAndTableSerialSql, createUpdateSerialSql, deleteImpl, deleteObject, deletePlain, deleteReferencedRelations, deleteReferencingRelations, 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, isCountingModification, isDeleted, isEntity, isIdValid, isImmutable, isLoggingModification, isModified, isNew, isOverloadable, isPersistable, isReferenced, isRemovable, isSessionImmutable, isStatementAlwaysPrepared, isTableSerialProvided, isTracked, isUpdateNecessary, isUpdatingSerialEvenIfNotModified, isVirgin, loadLazyReferences, logModification, markDeleted, newId, newInstance, newInstance, newInstance, persistObject, prepareDelete, prepareSave, prepareSetFields, 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_TRACKEDNAME
public DbModification(Db db, String trackedName)
db - the database connectiontrackedName - the tracked namepublic DbModification(Db db)
db - the database connectionpublic DbModification()
Class.newInstance().public static void initializeModificationTable(Db db)
db - the sessionpublic DbObjectClassVariables<DbModification> getClassVariables()
AbstractDbObjectDbObjectClassVariables.getClassVariables in class AbstractDbObject<DbModification>public String toString()
AbstractDbObjectAbstractDbObject.toGenericString().toString in class AbstractDbObject<DbModification>public void getFields(ResultSetWrapper rs)
AbstractDbObjectgetFields in class AbstractDbObject<DbModification>rs - the result setpublic int setFields(PreparedStatementWrapper st)
AbstractDbObjectPreparedStatementWrapper from the object's attributes.setFields in class AbstractDbObject<DbModification>st - the statementpublic String createInsertSql()
AbstractDbObjectcreateInsertSql in class AbstractDbObject<DbModification>public String createUpdateSql()
AbstractDbObjectcreateUpdateSql in class AbstractDbObject<DbModification>public String getTrackedName()
public void setTrackedName(String trackedName)
trackedName - the tablenamepublic int countModification(long count)
count - the number of modifications to addpublic void addToModificationTable(boolean tableExists,
String tableSerialTableName)
tableExists - true if related to a PDO, false if just a nametableSerialTableName - the table to scan for max tableserial if PDO manages a tableserialpublic long refresh()
public IdSerialTuple selectIdSerial(String tableName)
tableName - the database tablenamepublic String selectTableNameForId(long id)
id - the table IDpublic long selectMasterSerial()
Copyright © 2016 Krake Softwaretechnik. All rights reserved.