Package org.apache.openjpa.jdbc.meta
Class FieldMappingInfo
java.lang.Object
org.apache.openjpa.jdbc.meta.MappingInfo
org.apache.openjpa.jdbc.meta.FieldMappingInfo
- All Implemented Interfaces:
Serializable,Commentable
Information about the mapping from a field to the schema, in raw form.
The columns and tables used in mapping info will not be part of the
SchemaGroup used at runtime. Rather, they will be structs
with the relevant pieces of information filled in.- Author:
- Abe White, Pinaki Poddar
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.openjpa.jdbc.meta.MappingInfo
MappingInfo.ForeignKeyDefaults, MappingInfo.TableDefaults -
Field Summary
Fields inherited from class org.apache.openjpa.jdbc.meta.MappingInfo
JOIN_FORWARD, JOIN_INVERSE, JOIN_NONEFields inherited from interface org.apache.openjpa.lib.xml.Commentable
EMPTY_COMMENTS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd Unique Constraint to the Join Table.booleanWhether we can have an ordering column.protected voidclear(boolean canFlags) Clear mapping information.voidcopy(MappingInfo info) Copy missing info from the instance to this one.String[]Return comments, or empty array if none.getJoin(FieldMapping field, Table table, boolean adapt) Return the join from the field table to the owning class table.getJoin(FieldMapping field, Table table, boolean adapt, List<Column> cols) getJoinForeignKey(FieldMapping field, Table table, boolean adapt) getJoinIndex(FieldMapping field, boolean adapt) Index on the field join.Unique[]getJoinTableUniques(FieldMapping field, boolean def, boolean adapt) Get the unique constraints associated with the Sequence table.getJoinUnique(FieldMapping field, boolean def, boolean adapt) Unique constraint on the field join.Raw synthetic ordering column.getOrderColumn(FieldMapping field, Table table, boolean adapt) Return the ordering column for this field, or null if none.getTable(FieldMapping field, boolean create, boolean adapt) Return the table for the given field, or null if no table given.Deprecated.booleanReturn true if this info has columns, foreign key information, index information, etc.booleanWhether the field's table is joined to the class table through an outer join.voidsetCanOrderColumn(boolean canOrder) Whether we can have an ordering column.voidsetComments(String[] comments) Set comments.voidsetJoinOuter(boolean outer) Whether the field's table is joined to the class table through an outer join.voidsetOrderColumn(Column order) Raw synthetic ordering column.voidsetTableIdentifier(DBIdentifier tableName) voidsetTableName(String tableName) Deprecated.protected voidsyncJoinTableUniques(MetaDataContext context, Unique[] unqs) Sets internal constraint information to match given mapped constraint.voidsyncOrderColumn(FieldMapping field) Synchronize internal order column information with the given field.voidsyncStrategy(FieldMapping field) Synchronize internal mapping strategy information with the given field.voidsyncWith(FieldMapping field) Synchronize internal information with the mapping data for the given field.Methods inherited from class org.apache.openjpa.jdbc.meta.MappingInfo
assertNoForeignKey, assertNoIndex, assertNoJoin, assertNoSchemaComponents, assertNoUnique, assertStrategy, canForeignKey, canIndex, canUnique, clear, createColumns, createForeignKey, createIndex, createTable, createTable, createUnique, getColumnIO, getColumns, getColumns, getColumns, getForeignKey, getIndex, getJoinDirection, getStrategy, getUnique, isImplicitRelation, mergeColumn, setCanForeignKey, setCanIndex, setCanUnique, setColumnIO, setColumns, setForeignKey, setImplicitRelation, setIndex, setJoinDirection, setStrategy, setUnique, syncColumn, syncColumns, syncForeignKey, syncIndex, syncUnique
-
Constructor Details
-
FieldMappingInfo
public FieldMappingInfo()
-
-
Method Details
-
getTableName
Deprecated.The user-supplied name of the table for this field. -
getTableIdentifier
-
setTableName
Deprecated.The user-supplied name of the table for this field. -
setTableIdentifier
-
isJoinOuter
public boolean isJoinOuter()Whether the field's table is joined to the class table through an outer join. -
setJoinOuter
public void setJoinOuter(boolean outer) Whether the field's table is joined to the class table through an outer join. -
getOrderColumn
Raw synthetic ordering column. -
setOrderColumn
Raw synthetic ordering column. -
canOrderColumn
public boolean canOrderColumn()Whether we can have an ordering column. -
setCanOrderColumn
public void setCanOrderColumn(boolean canOrder) Whether we can have an ordering column. -
getTable
Return the table for the given field, or null if no table given. -
getJoinForeignKey
-
getJoin
Return the join from the field table to the owning class table. -
getJoin
-
getJoinUnique
Unique constraint on the field join. -
addJoinTableUnique
Add Unique Constraint to the Join Table. -
getJoinTableUniques
Get the unique constraints associated with the Sequence table. -
getJoinIndex
Index on the field join. -
getOrderColumn
Return the ordering column for this field, or null if none. -
syncWith
Synchronize internal information with the mapping data for the given field. -
syncStrategy
Synchronize internal mapping strategy information with the given field. -
syncOrderColumn
Synchronize internal order column information with the given field. -
syncJoinTableUniques
Sets internal constraint information to match given mapped constraint. -
hasSchemaComponents
public boolean hasSchemaComponents()Description copied from class:MappingInfoReturn true if this info has columns, foreign key information, index information, etc.- Overrides:
hasSchemaComponentsin classMappingInfo
-
clear
protected void clear(boolean canFlags) Description copied from class:MappingInfoClear mapping information.- Overrides:
clearin classMappingInfo- Parameters:
canFlags- whether to clear information about whether we can place indexed, foreign keys, etc on this mapping
-
copy
Description copied from class:MappingInfoCopy missing info from the instance to this one.- Overrides:
copyin classMappingInfo
-
getComments
Description copied from interface:CommentableReturn comments, or empty array if none.- Specified by:
getCommentsin interfaceCommentable
-
setComments
Description copied from interface:CommentableSet comments.- Specified by:
setCommentsin interfaceCommentable
-