Extra meta data for a class stored in JDBC. Some of the fields are
also present in the normal ClassMetaData and are duplicated here for
performance reasons.
Field Summary
final public static int
INHERITANCE_FLAT Subclass fields stored in the table of its immediate superclass.
findClass(Object jdbcClassId) Find the class with the given JDBC classId.
public void
findFieldsForColumn(ClassMetaData cmd, String columnName, List list) Find all fields in this class that have columnName in their main table
columns and add them to list.
markColumnsShared(String columnName, JdbcTable cTable) Mark any columns for fields in this class with name columnName
shared = true unless they are primary key fields.
public void
markSubclassColumnsShared(String columnName) Find any columns in any of our subclasses (and recursively their
subclasses) with columnName and set shared = true for them.
public void
setClassIdCol(JdbcColumn classIdCol) Set the classIdField for this class and recursively all its subclasses.
All the tables for this class including superclass tables. The entry
at 0 is the table for the topmost superclass. Also
table == allTables[allTables.length - 1].
The column used to hold the classId value for each row. This is used
to implement inheritance. It may be null if this class has no persistent
subclasses or if all of the subclasses use vertical inheritance. This
field is set to the same value for all the classes in a heirachy.
Our classId for this class. This does not have to be the same as that
in ClassMetaData. It only has to be unique within an inheritance
heirachy. This will default to the classId of the class. If the
classIdCol column is a number (INT etc) then this must be a Number.
Otherwise it must be a String.
See Also:ClassMetaData.classId
Treat rows in the database that would be instances of us as instances
of readAsClass instead. This is used to implement flat inheritance
with no descriminator where rows are instances of the leaf class.
The fields in State fieldNo order. Note that if a fieldNo is
transactional then its entry here will be null. This includes all
fields from superclasses.
Get the maximum number of OIDs for this class that can be included
in an IN (?, .., ?) statement. This depends on the database and the
number of columns in the primary key. The return value is zero if
this class has a composite primary key.
See if our jdbcClassId that those of all of our subclasses are ints.
This is used to default the type of the descriminator column to
INTEGER if possible.
Set the table for this class. This will also set the tablename and
allTables fields. This method must only be invoked one a subclass
if it has been called on its superclass.
toOptimisticLockingString
public static String toOptimisticLockingString(int o)(Code)