|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jpox.store.rdbms.table.ColumnCreator
Helper class to create columns. Takes the definition provided and adds columns to the associated table.
Field Summary | |
protected static Localiser |
LOCALISER
Localiser for messages. |
Method Summary | |
static DatastoreField |
createAdapterColumn(JavaTypeMapping adapterMapping,
StoreManager storeMgr,
ClassLoaderResolver clr,
DatastoreContainerObject table,
ColumnMetaData colmd,
boolean pk)
Convenience method to add the column for an adapter primary-key mapping. |
static void |
createColumnsForFieldUsingReference(JavaTypeMapping mapping,
DatastoreContainerObject table,
AbstractPropertyMetaData fmd,
ClassLoaderResolver clr,
boolean embedded)
Create columns for reference (Object/interface) fields. |
static void |
createColumnsForFieldUsingSubclassTable(JavaTypeMapping mapping,
DatastoreContainerObject table,
AbstractPropertyMetaData fmd,
ClassLoaderResolver clr)
Create columns for a field that uses subclass-table inheritance and where we want to have a FK for each subclass with its own table. |
static JavaTypeMapping |
createColumnsForJoinTables(java.lang.Class javaType,
AbstractPropertyMetaData fmd,
ColumnMetaData[] columnMetaData,
StoreManager storeMgr,
DatastoreContainerObject table,
boolean primaryKey,
boolean nullable,
boolean serialised,
boolean embedded,
DatastoreFieldRole role,
ClassLoaderResolver clr,
JavaTypeMapping adapterColumnMapping,
boolean adapterColumnMandatory)
Method to create the required columns (and mapping if necessary) for a field |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final Localiser LOCALISER
Method Detail |
public static DatastoreField createAdapterColumn(JavaTypeMapping adapterMapping, StoreManager storeMgr, ClassLoaderResolver clr, DatastoreContainerObject table, ColumnMetaData colmd, boolean pk)
adapterMapping
- The adapter mappingstoreMgr
- Manager for the storeclr
- ClassLoaderResolvertable
- Table where we create the columncolmd
- The column MetaDatapk
- Whether this column is (part of) the PK.
public static JavaTypeMapping createColumnsForJoinTables(java.lang.Class javaType, AbstractPropertyMetaData fmd, ColumnMetaData[] columnMetaData, StoreManager storeMgr, DatastoreContainerObject table, boolean primaryKey, boolean nullable, boolean serialised, boolean embedded, DatastoreFieldRole role, ClassLoaderResolver clr, JavaTypeMapping adapterColumnMapping, boolean adapterColumnMandatory)
javaType
- The java type of the fieldfmd
- Metadata for the fieldcolumnMetaData
- MetaData defining the columnsstoreMgr
- Store Managertable
- The table to add the mapping toprimaryKey
- Whether this field is the PKnullable
- Whether this field is to be nullableserialised
- Whether the field is serialisedembedded
- Whether the field is embeddedrole
- The role of this field (if any)clr
- ClassLoader resolveradapterColumnMapping
- Mapping for an adapter column (optional)adapterColumnMandatory
- Whether the adapter column column is mandatory
public static void createColumnsForFieldUsingSubclassTable(JavaTypeMapping mapping, DatastoreContainerObject table, AbstractPropertyMetaData fmd, ClassLoaderResolver clr)
mapping
- the mapping for the fieldtable
- the Table which will hold the columnsfmd
- MetaData for the fieldclr
- The ClassLoaderResolverpublic static void createColumnsForFieldUsingReference(JavaTypeMapping mapping, DatastoreContainerObject table, AbstractPropertyMetaData fmd, ClassLoaderResolver clr, boolean embedded)
mapping
- the mapping for the fieldtable
- the Table which will hold the columnsfmd
- MetaData for the fieldclr
- The ClassLoaderResolverembedded
- Whether the field is embedded
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |