|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tentackle.db.DbObjectClassVariables
public class DbObjectClassVariables
Holds static class variables for classes derived from DbObject.
This is a "singleton per class".
All classvariables register to a static Map that can be queried by apps
by tablename.
| Field Summary | |
|---|---|
boolean |
alwaysPrepare
true if prepared statements should always be prepared (i.e. |
String |
classBaseName
the base-classname |
String |
className
the full classname |
Class<? extends DbObject> |
clazz
the class |
int |
deleteStatementId
prepared statement ID for delete() |
int |
dummyUpdateStatementId
prepared statement ID for dummyUpdate() |
TableSerialExpirationBacklog |
expirationBacklog
table serial expiration backlog |
int |
fieldCount
number of db-columns, 0 = not known so far |
int |
idSourceId
the source for obtaining a new ID |
int |
insertStatementId
prepared statement ID for insert() |
long |
instanceCount
General purpose instance (or ID) counter. |
String |
multiName
name for multiple objects |
Properties |
properties
class properties |
int |
remoteDelegateId
ID for the remote delegate for this class. |
int |
selectAllStatementId
prepared statement ID for selectAll() |
int |
selectExpiredTableSerials1StatementId
prepared statement ID for selectExpiredTableSerials() |
int |
selectExpiredTableSerials2StatementId
|
int |
selectLockedStatementId
prepared statement ID for selectLocked() |
int |
selectSerialStatementId
prepared statement ID for selectSerial() |
int |
selectStatementId
prepared statement ID for select() |
String |
singleName
name for a single object |
String |
tableName
database table name |
int |
updateSerialAndTableSerialStatementId
prepared statement ID for updateSerialAndTableSerial() |
int |
updateSerialStatementId
prepared statement ID for updateSerial() |
int |
updateStatementId
prepared statement ID for update() |
int |
updateTableSerialStatementId
prepared statement ID for updateTableSerial() |
| Constructor Summary | |
|---|---|
DbObjectClassVariables(Class<? extends DbObject> clazz,
String tableName,
String singleName,
String multiName)
constructs a classvariable. |
|
| Method Summary | |
|---|---|
long |
countInstance()
Gets a unique instance number for pseudo-objects (e.g. |
String |
getProperty(String key)
Gets a class property. |
DbObjectRemoteDelegate |
getRemoteDelegate(Db db)
Gets the RemoteDelegate for the class and db. |
int |
getRemoteDelegateId(Db db)
Gets the delegateId of the class, i.e. |
static DbObjectClassVariables |
getVariables(String tableName)
Gets the classvariables for a given tablename. |
String |
toString()
Returns a string representation of the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public Class<? extends DbObject> clazz
public String className
public String classBaseName
public Properties properties
public String tableName
public String singleName
public String multiName
public int fieldCount
public int remoteDelegateId
public boolean alwaysPrepare
public int selectStatementId
public int selectAllStatementId
public int selectLockedStatementId
public int selectSerialStatementId
public int insertStatementId
public int updateStatementId
public int deleteStatementId
public int dummyUpdateStatementId
public int updateSerialStatementId
public int updateTableSerialStatementId
public int updateSerialAndTableSerialStatementId
public int selectExpiredTableSerials1StatementId
public int selectExpiredTableSerials2StatementId
public TableSerialExpirationBacklog expirationBacklog
public int idSourceId
public long instanceCount
countInstance() to get a new unique number.
| Constructor Detail |
|---|
public DbObjectClassVariables(Class<? extends DbObject> clazz,
String tableName,
String singleName,
String multiName)
clazz - is the class of the derived DbObjecttableName - is the SQL tablenamesingleName - text for a single objectmultiName - text for multiple objects| Method Detail |
|---|
public long countInstance()
AppDbPseudoObject
to simulate a unique ID.
Or for other purposes.
public int getRemoteDelegateId(Db db)
db - the db connection
public DbObjectRemoteDelegate getRemoteDelegate(Db db)
db - the db connection
public String getProperty(String key)
key - the property key
public String toString()
java.lang.ObjecttoString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString in class Objectpublic static DbObjectClassVariables getVariables(String tableName)
tableName - is the database tablename
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||