public final class ColumnCreator extends Object
Modifier and Type | Method and Description |
---|---|
static JavaTypeMapping |
createColumnsForField(Class javaType,
JavaTypeMapping mapping,
Table table,
RDBMSStoreManager storeMgr,
org.datanucleus.metadata.AbstractMemberMetaData mmd,
boolean isPrimaryKey,
boolean isNullable,
boolean serialised,
boolean embedded,
org.datanucleus.metadata.FieldRole fieldRole,
org.datanucleus.metadata.ColumnMetaData[] columnMetaData,
org.datanucleus.ClassLoaderResolver clr,
boolean isReferenceField)
Method to create the column(s) for a field in either a join table or for a reference field.
|
static JavaTypeMapping |
createColumnsForJoinTables(Class javaType,
org.datanucleus.metadata.AbstractMemberMetaData mmd,
org.datanucleus.metadata.ColumnMetaData[] columnMetaData,
RDBMSStoreManager storeMgr,
Table table,
boolean primaryKey,
boolean nullable,
org.datanucleus.metadata.FieldRole fieldRole,
org.datanucleus.ClassLoaderResolver clr)
Method to create the mapping for a join table for collection element, array element, map key,
map value.
|
static Column |
createIndexColumn(JavaTypeMapping mapping,
RDBMSStoreManager storeMgr,
org.datanucleus.ClassLoaderResolver clr,
Table table,
org.datanucleus.metadata.ColumnMetaData colmd,
boolean pk)
Convenience method to add the column for an index mapping.
|
public static Column createIndexColumn(JavaTypeMapping mapping, RDBMSStoreManager storeMgr, org.datanucleus.ClassLoaderResolver clr, Table table, org.datanucleus.metadata.ColumnMetaData colmd, boolean pk)
mapping
- The 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(Class javaType, org.datanucleus.metadata.AbstractMemberMetaData mmd, org.datanucleus.metadata.ColumnMetaData[] columnMetaData, RDBMSStoreManager storeMgr, Table table, boolean primaryKey, boolean nullable, org.datanucleus.metadata.FieldRole fieldRole, org.datanucleus.ClassLoaderResolver clr)
javaType
- The java type of the fieldmmd
- Metadata for the field/propertycolumnMetaData
- 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 nullablefieldRole
- The role of the mapping within this fieldclr
- ClassLoader resolverpublic static JavaTypeMapping createColumnsForField(Class javaType, JavaTypeMapping mapping, Table table, RDBMSStoreManager storeMgr, org.datanucleus.metadata.AbstractMemberMetaData mmd, boolean isPrimaryKey, boolean isNullable, boolean serialised, boolean embedded, org.datanucleus.metadata.FieldRole fieldRole, org.datanucleus.metadata.ColumnMetaData[] columnMetaData, org.datanucleus.ClassLoaderResolver clr, boolean isReferenceField)
javaType
- The java type of the field being storedmapping
- The JavaTypeMapping (if existing, otherwise created and returned by this method)table
- The table to insert the columns into (join table, or primary table (if ref field))storeMgr
- Manager for the storemmd
- MetaData for the field (or null if a collection field)isPrimaryKey
- Whether to create the columns as part of the PKisNullable
- Whether the columns should be nullableserialised
- Whether the field is serialisedembedded
- Whether the field is embeddedfieldRole
- The role of the field (when part of a join table)columnMetaData
- MetaData for the column(s)clr
- ClassLoader resolverisReferenceField
- Whether this field is part of a reference fieldCopyright © 2017. All rights reserved.