public class ClassMappingInfo extends MappingInfo implements SourceTracker, Commentable
SchemaGroup used at runtime. Rather, they will be structs
with the relevant pieces of information filled in.MappingInfo.ForeignKeyDefaults, MappingInfo.TableDefaultsJOIN_FORWARD, JOIN_INVERSE, JOIN_NONESRC_ANNOTATIONS, SRC_OTHER, SRC_XMLEMPTY_COMMENTS| Constructor and Description |
|---|
ClassMappingInfo() |
| Modifier and Type | Method and Description |
|---|---|
void |
addIndex(DBIdentifier table,
Index idx)
Add index for the given table.
|
void |
addSecondaryTable(DBIdentifier second) |
void |
addSecondaryTable(String second)
Deprecated.
|
void |
addUnique(DBIdentifier table,
Unique unique)
Add a unique constraint for the given table.
|
void |
addUnique(String table,
Unique unique)
Deprecated.
|
protected void |
clear(boolean canFlags)
Clear mapping information.
|
void |
copy(MappingInfo info)
Copy missing info from the instance to this one.
|
String |
getClassName()
The described class name.
|
int |
getColNumber()
Return the column number in the line of the file at which this
instance was parsed.
|
String[] |
getComments()
Return comments, or empty array if none.
|
Column[] |
getDataStoreIdColumns(ClassMapping cls,
Column[] tmplates,
Table table,
boolean adapt)
Return the datastore identity columns for the given class, based on the
given templates.
|
String |
getHierarchyStrategy()
The default strategy for subclasses in this hierarchy.
|
Index[] |
getIndices(MetaDataContext cm,
boolean adapt)
Get all indices associated with both the primary and/or
secondary tables.
|
int |
getLineNumber()
Return the line number of the file at which this instance was parsed.
|
String |
getResourceName()
Return the domain-meaningful name of the resource that was loaded
from this source.
|
DBIdentifier |
getSchemaIdentifier() |
String |
getSchemaName()
Deprecated.
|
DBIdentifier |
getSecondaryTableIdentifier(DBIdentifier tableName) |
DBIdentifier[] |
getSecondaryTableIdentifiers() |
List<Column> |
getSecondaryTableJoinColumns(DBIdentifier tableName) |
List<Column> |
getSecondaryTableJoinColumns(String tableName)
Deprecated.
|
String |
getSecondaryTableName(String tableName)
Deprecated.
|
String[] |
getSecondaryTableNames()
Deprecated.
|
File |
getSourceFile()
Return the file from which this instance was parsed.
|
Object |
getSourceScope()
Return the domain-dependent scope of this instance within its file.
|
int |
getSourceType()
Return the type of source.
|
ForeignKey |
getSuperclassJoin(ClassMapping cls,
Table table,
boolean adapt)
Return the join from this class to its superclass.
|
Table |
getTable(ClassMapping cls,
boolean adapt)
Return the primary table for the given class.
|
Table |
getTable(ClassMapping cls,
DBIdentifier tableName,
boolean adapt)
Return the named table for the given class.
|
Table |
getTable(ClassMapping cls,
String tableName,
boolean adapt)
Deprecated.
|
DBIdentifier |
getTableIdentifier() |
String |
getTableName()
Deprecated.
|
Unique[] |
getUniques(DBIdentifier table)
Get the unique constraints of the given primary or secondary table.
|
Unique[] |
getUniques(MetaDataContext cm,
boolean adapt)
Get all the unique constraints associated with both the primary and/or
secondary tables.
|
Unique[] |
getUniques(String table)
Deprecated.
|
boolean |
hasSchemaComponents()
Return true if this info has columns, foreign key information, index
information, etc.
|
boolean |
isJoinedSubclass()
Whether there is a join to the superclass table.
|
void |
setClassName(String name)
The described class name.
|
void |
setColNumber(int colNum) |
void |
setComments(String[] comments)
Set comments.
|
void |
setHierarchyStrategy(String strategy)
The default strategy for subclasses in this hierarchy.
|
void |
setJoinedSubclass(boolean joined)
Whether there is a join to the superclass table.
|
void |
setLineNumber(int lineNum) |
void |
setSchemaIdentifier(DBIdentifier schema) |
void |
setSchemaName(String schema)
Deprecated.
|
void |
setSecondaryTableJoinColumns(DBIdentifier tableName,
List<Column> cols) |
void |
setSecondaryTableJoinColumns(String tableName,
List<Column> cols)
Deprecated.
|
void |
setSource(File file,
int srcType) |
void |
setTableIdentifier(DBIdentifier table) |
void |
setTableName(String table)
Deprecated.
|
void |
syncWith(ClassMapping cls)
Synchronize internal information with the mapping data for the given
class.
|
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, syncUniquepublic String getClassName()
public void setClassName(String name)
public String getHierarchyStrategy()
public void setHierarchyStrategy(String strategy)
@Deprecated public String getTableName()
public DBIdentifier getTableIdentifier()
@Deprecated public void setTableName(String table)
public void setTableIdentifier(DBIdentifier table)
@Deprecated public String getSchemaName()
public DBIdentifier getSchemaIdentifier()
@Deprecated public void setSchemaName(String schema)
public void setSchemaIdentifier(DBIdentifier schema)
public boolean isJoinedSubclass()
public void setJoinedSubclass(boolean joined)
@Deprecated public String[] getSecondaryTableNames()
public DBIdentifier[] getSecondaryTableIdentifiers()
@Deprecated public String getSecondaryTableName(String tableName)
public DBIdentifier getSecondaryTableIdentifier(DBIdentifier tableName)
@Deprecated public List<Column> getSecondaryTableJoinColumns(String tableName)
public List<Column> getSecondaryTableJoinColumns(DBIdentifier tableName)
@Deprecated public void addSecondaryTable(String second)
public void addSecondaryTable(DBIdentifier second)
@Deprecated public void setSecondaryTableJoinColumns(String tableName, List<Column> cols)
public void setSecondaryTableJoinColumns(DBIdentifier tableName, List<Column> cols)
@Deprecated public Table getTable(ClassMapping cls, String tableName, boolean adapt)
public Table getTable(ClassMapping cls, DBIdentifier tableName, boolean adapt)
public Table getTable(ClassMapping cls, boolean adapt)
public Column[] getDataStoreIdColumns(ClassMapping cls, Column[] tmplates, Table table, boolean adapt)
public ForeignKey getSuperclassJoin(ClassMapping cls, Table table, boolean adapt)
public void syncWith(ClassMapping cls)
public boolean hasSchemaComponents()
MappingInfohasSchemaComponents in class MappingInfoprotected void clear(boolean canFlags)
MappingInfoclear in class MappingInfocanFlags - whether to clear information about whether we
can place indexed, foreign keys, etc on this mappingpublic void copy(MappingInfo info)
MappingInfocopy in class MappingInfo@Deprecated public void addUnique(String table, Unique unique)
table - must be primary table or secondary table name added a
priori to this receiver.unique - the unique constraint. null means no-op.public void addUnique(DBIdentifier table, Unique unique)
table - must be primary table or secondary table name added a
priori to this receiver.unique - the unique constraint. null means no-op.public void addIndex(DBIdentifier table, Index idx)
table - must be primary table or secondary table name added a
priori to this receiver.idx - the index. null means no-op.@Deprecated public Unique[] getUniques(String table)
public Unique[] getUniques(DBIdentifier table)
public Unique[] getUniques(MetaDataContext cm, boolean adapt)
public Index[] getIndices(MetaDataContext cm, boolean adapt)
public File getSourceFile()
SourceTrackergetSourceFile in interface SourceTrackerpublic Object getSourceScope()
SourceTrackergetSourceScope in interface SourceTrackerpublic int getSourceType()
SourceTrackergetSourceType in interface SourceTrackerpublic void setSource(File file, int srcType)
public String getResourceName()
SourceTrackergetResourceName in interface SourceTrackerpublic String[] getComments()
CommentablegetComments in interface Commentablepublic void setComments(String[] comments)
CommentablesetComments in interface Commentablepublic int getLineNumber()
SourceTrackergetLineNumber in interface SourceTrackerpublic void setLineNumber(int lineNum)
public int getColNumber()
SourceTrackergetColNumber in interface SourceTrackerpublic void setColNumber(int colNum)
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.