public class FieldMappingInfo extends MappingInfo implements Commentable
SchemaGroup
used at runtime. Rather, they will be structs
with the relevant pieces of information filled in.MappingInfo.ForeignKeyDefaults, MappingInfo.TableDefaults
JOIN_FORWARD, JOIN_INVERSE, JOIN_NONE
EMPTY_COMMENTS
Constructor and Description |
---|
FieldMappingInfo() |
Modifier and Type | Method and Description |
---|---|
void |
addJoinTableUnique(Unique u)
Add Unique Constraint to the Join Table.
|
boolean |
canOrderColumn()
Whether we can have an ordering column.
|
protected void |
clear(boolean canFlags)
Clear mapping information.
|
void |
copy(MappingInfo info)
Copy missing info from the instance to this one.
|
String[] |
getComments()
Return comments, or empty array if none.
|
ForeignKey |
getJoin(FieldMapping field,
Table table,
boolean adapt)
Return the join from the field table to the owning class table.
|
ForeignKey |
getJoin(FieldMapping field,
Table table,
boolean adapt,
List<Column> cols) |
ForeignKey |
getJoinForeignKey(FieldMapping field,
Table table,
boolean adapt) |
Index |
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.
|
Unique |
getJoinUnique(FieldMapping field,
boolean def,
boolean adapt)
Unique constraint on the field join.
|
Column |
getOrderColumn()
Raw synthetic ordering column.
|
Column |
getOrderColumn(FieldMapping field,
Table table,
boolean adapt)
Return the ordering column for this field, or null if none.
|
Table |
getTable(FieldMapping field,
boolean create,
boolean adapt)
Return the table for the given field, or null if no table given.
|
DBIdentifier |
getTableIdentifier() |
String |
getTableName()
Deprecated.
|
boolean |
hasSchemaComponents()
Return true if this info has columns, foreign key information, index
information, etc.
|
boolean |
isJoinOuter()
Whether the field's table is joined to the class table through an
outer join.
|
void |
setCanOrderColumn(boolean canOrder)
Whether we can have an ordering column.
|
void |
setComments(String[] comments)
Set comments.
|
void |
setJoinOuter(boolean outer)
Whether the field's table is joined to the class table through an
outer join.
|
void |
setOrderColumn(Column order)
Raw synthetic ordering column.
|
void |
setTableIdentifier(DBIdentifier tableName) |
void |
setTableName(String tableName)
Deprecated.
|
protected void |
syncJoinTableUniques(MetaDataContext context,
Unique[] unqs)
Sets internal constraint information to match given mapped constraint.
|
void |
syncOrderColumn(FieldMapping field)
Synchronize internal order column information with the given field.
|
void |
syncStrategy(FieldMapping field)
Synchronize internal mapping strategy information with the given field.
|
void |
syncWith(FieldMapping field)
Synchronize internal information with the mapping data for the given
field.
|
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
public String getTableName()
public DBIdentifier getTableIdentifier()
public void setTableName(String tableName)
public void setTableIdentifier(DBIdentifier tableName)
public boolean isJoinOuter()
public void setJoinOuter(boolean outer)
public Column getOrderColumn()
public void setOrderColumn(Column order)
public boolean canOrderColumn()
public void setCanOrderColumn(boolean canOrder)
public Table getTable(FieldMapping field, boolean create, boolean adapt)
public ForeignKey getJoinForeignKey(FieldMapping field, Table table, boolean adapt)
public ForeignKey getJoin(FieldMapping field, Table table, boolean adapt)
public ForeignKey getJoin(FieldMapping field, Table table, boolean adapt, List<Column> cols)
public Unique getJoinUnique(FieldMapping field, boolean def, boolean adapt)
public void addJoinTableUnique(Unique u)
public Unique[] getJoinTableUniques(FieldMapping field, boolean def, boolean adapt)
public Index getJoinIndex(FieldMapping field, boolean adapt)
public Column getOrderColumn(FieldMapping field, Table table, boolean adapt)
public void syncWith(FieldMapping field)
public void syncStrategy(FieldMapping field)
public void syncOrderColumn(FieldMapping field)
protected void syncJoinTableUniques(MetaDataContext context, Unique[] unqs)
public boolean hasSchemaComponents()
MappingInfo
hasSchemaComponents
in class MappingInfo
protected void clear(boolean canFlags)
MappingInfo
clear
in class MappingInfo
canFlags
- whether to clear information about whether we
can place indexed, foreign keys, etc on this mappingpublic void copy(MappingInfo info)
MappingInfo
copy
in class MappingInfo
public String[] getComments()
Commentable
getComments
in interface Commentable
public void setComments(String[] comments)
Commentable
setComments
in interface Commentable
Copyright © 2006–2017 Apache Software Foundation. All rights reserved.