|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.jdbc.meta.MappingInfo
org.apache.openjpa.jdbc.meta.ClassMappingInfo
public class ClassMappingInfo
Information about the mapping from a class 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.
| 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_NONE |
| Fields inherited from interface org.apache.openjpa.lib.meta.SourceTracker |
|---|
SRC_ANNOTATIONS, SRC_OTHER, SRC_XML |
| Fields inherited from interface org.apache.openjpa.lib.xml.Commentable |
|---|
EMPTY_COMMENTS |
| Constructor Summary | |
|---|---|
ClassMappingInfo()
|
|
| Method Summary | |
|---|---|
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()
|
String[] |
getComments()
|
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. |
int |
getLineNumber()
|
String |
getResourceName()
|
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()
|
Object |
getSourceScope()
|
int |
getSourceType()
|
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)
|
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. |
| Methods inherited from class org.apache.openjpa.jdbc.meta.MappingInfo |
|---|
assertNoForeignKey, assertNoIndex, assertNoJoin, assertNoSchemaComponents, assertNoUnique, assertStrategy, canForeignKey, canIndex, canMerge, 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassMappingInfo()
| Method Detail |
|---|
public String getClassName()
public void setClassName(String name)
public String getHierarchyStrategy()
public void setHierarchyStrategy(String strategy)
public String getTableName()
public DBIdentifier getTableIdentifier()
public void setTableName(String table)
public void setTableIdentifier(DBIdentifier table)
public String getSchemaName()
public DBIdentifier getSchemaIdentifier()
public void setSchemaName(String schema)
public void setSchemaIdentifier(DBIdentifier schema)
public boolean isJoinedSubclass()
public void setJoinedSubclass(boolean joined)
public String[] getSecondaryTableNames()
public DBIdentifier[] getSecondaryTableIdentifiers()
public String getSecondaryTableName(String tableName)
public DBIdentifier getSecondaryTableIdentifier(DBIdentifier tableName)
public List<Column> getSecondaryTableJoinColumns(String tableName)
public List<Column> getSecondaryTableJoinColumns(DBIdentifier tableName)
public void addSecondaryTable(String second)
public void addSecondaryTable(DBIdentifier second)
public void setSecondaryTableJoinColumns(String tableName,
List<Column> cols)
public void setSecondaryTableJoinColumns(DBIdentifier tableName,
List<Column> cols)
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()
MappingInfo
hasSchemaComponents in class MappingInfoprotected void clear(boolean canFlags)
MappingInfo
clear in class MappingInfocanFlags - 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 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 Unique[] getUniques(String table)
public Unique[] getUniques(DBIdentifier table)
public Unique[] getUniques(MetaDataContext cm,
boolean adapt)
public File getSourceFile()
getSourceFile in interface SourceTrackerpublic Object getSourceScope()
getSourceScope in interface SourceTrackerpublic int getSourceType()
getSourceType in interface SourceTracker
public void setSource(File file,
int srcType)
public String getResourceName()
getResourceName in interface SourceTrackerpublic String[] getComments()
getComments in interface Commentablepublic void setComments(String[] comments)
setComments in interface Commentablepublic int getLineNumber()
getLineNumber in interface SourceTrackerpublic void setLineNumber(int lineNum)
public int getColNumber()
getColNumber in interface SourceTrackerpublic void setColNumber(int colNum)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||