org.tentackle.db
Class LegacyDbObjectClassVariables

java.lang.Object
  extended by org.tentackle.db.LegacyDbObjectClassVariables

public class LegacyDbObjectClassVariables
extends Object

Minimal class variables for LegacyDbObjects.

Author:
harald

Field Summary
 boolean alwaysPrepare
          true if prepared statements should always be prepared (i.e.
 String classBaseName
          the base-classname
 Class<? extends LegacyDbObject> clazz
          the class
 int deleteStatementId
          prepared statement ID for delete()
 int existsStatementId
          prepared statement ID for exists()
 int fieldCount
          number of db-columns, 0 = not known so far
 int insertStatementId
          prepared statement ID for insert()
 String multiName
          name for multiple objects
 int selectAllStatementId
          prepared statement ID for selectAll()
 String singleName
          name for a single object
 String tableName
          database table name
 int updateStatementId
          prepared statement ID for update()
 
Constructor Summary
LegacyDbObjectClassVariables(Class<? extends LegacyDbObject> clazz, String tableName, String singleName, String multiName)
          Constructs a classvariable.
 
Method Summary
static LegacyDbObjectClassVariables getVariables(String tableName)
          Gets the classvariables for a given tablename
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clazz

public Class<? extends LegacyDbObject> clazz
the class


classBaseName

public String classBaseName
the base-classname


tableName

public String tableName
database table name


singleName

public String singleName
name for a single object


multiName

public String multiName
name for multiple objects


fieldCount

public int fieldCount
number of db-columns, 0 = not known so far


alwaysPrepare

public boolean alwaysPrepare
true if prepared statements should always be prepared (i.e. if the statement is changing for some reasons, e.g. the tablename).


selectAllStatementId

public int selectAllStatementId
prepared statement ID for selectAll()


insertStatementId

public int insertStatementId
prepared statement ID for insert()


updateStatementId

public int updateStatementId
prepared statement ID for update()


deleteStatementId

public int deleteStatementId
prepared statement ID for delete()


existsStatementId

public int existsStatementId
prepared statement ID for exists()

Constructor Detail

LegacyDbObjectClassVariables

public LegacyDbObjectClassVariables(Class<? extends LegacyDbObject> clazz,
                                    String tableName,
                                    String singleName,
                                    String multiName)
Constructs a classvariable.

Parameters:
clazz - is the class of the derived DbObject
tableName - is the SQL tablename
singleName - text for a single object
multiName - text for multiple objects
Throws:
IllegalStateException - if already constructed
Method Detail

getVariables

public static LegacyDbObjectClassVariables getVariables(String tableName)
Gets the classvariables for a given tablename

Parameters:
tableName - is the database tablename
Returns:
the classvariables or null if no such tablename


Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de