|
||||||||||
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 |
addUnique(Unique unique)
|
protected void |
clear(boolean canFlags)
Clear mapping information. |
void |
copy(MappingInfo info)
Copy missing info from the instance to this one. |
java.lang.String |
getClassName()
The described class name. |
java.lang.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. |
java.lang.String |
getHierarchyStrategy()
The default strategy for subclasses in this hierarchy. |
java.lang.String |
getResourceName()
|
java.lang.String |
getSchemaName()
The default schema name for unqualified tables. |
java.util.List |
getSecondaryTableJoinColumns(java.lang.String tableName)
Return any columns defined for the given class level join, or empty list if none. |
java.lang.String |
getSecondaryTableName(java.lang.String tableName)
We allow fields to reference class-level joins using just the table name, whereas the class join might have schema, etc information. |
java.lang.String[] |
getSecondaryTableNames()
Return the class-level joined tables. |
java.io.File |
getSourceFile()
|
java.lang.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 table for the given class. |
java.lang.String |
getTableName()
The given table name. |
Unique[] |
getUniques()
|
Unique[] |
getUniques(ClassMapping cm,
boolean adapt)
|
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(java.lang.String name)
The described class name. |
void |
setComments(java.lang.String[] comments)
|
void |
setHierarchyStrategy(java.lang.String strategy)
The default strategy for subclasses in this hierarchy. |
void |
setJoinedSubclass(boolean joined)
Whether there is a join to the superclass table. |
void |
setSchemaName(java.lang.String schema)
The default schema name for unqualified tables. |
void |
setSecondaryTableJoinColumns(java.lang.String tableName,
java.util.List cols)
Declare the given class-level join. |
void |
setSource(java.io.File file,
int srcType)
|
void |
setTableName(java.lang.String table)
The given table name. |
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, canUnique, clear, createColumns, createForeignKey, createIndex, createTable, createUnique, getColumnIO, getColumns, getForeignKey, getIndex, getJoinDirection, getStrategy, getUnique, mergeColumn, setCanForeignKey, setCanIndex, setCanUnique, setColumnIO, setColumns, setForeignKey, 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 java.lang.String getClassName()
public void setClassName(java.lang.String name)
public java.lang.String getHierarchyStrategy()
public void setHierarchyStrategy(java.lang.String strategy)
public java.lang.String getTableName()
public void setTableName(java.lang.String table)
public java.lang.String getSchemaName()
public void setSchemaName(java.lang.String schema)
public boolean isJoinedSubclass()
public void setJoinedSubclass(boolean joined)
public java.lang.String[] getSecondaryTableNames()
public java.lang.String getSecondaryTableName(java.lang.String tableName)
public java.util.List getSecondaryTableJoinColumns(java.lang.String tableName)
public void setSecondaryTableJoinColumns(java.lang.String tableName, java.util.List cols)
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 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 void addUnique(Unique unique)
public Unique[] getUniques()
public Unique[] getUniques(ClassMapping cm, boolean adapt)
public java.io.File getSourceFile()
getSourceFile
in interface org.apache.openjpa.lib.meta.SourceTracker
public java.lang.Object getSourceScope()
getSourceScope
in interface org.apache.openjpa.lib.meta.SourceTracker
public int getSourceType()
getSourceType
in interface org.apache.openjpa.lib.meta.SourceTracker
public void setSource(java.io.File file, int srcType)
public java.lang.String getResourceName()
getResourceName
in interface org.apache.openjpa.lib.meta.SourceTracker
public java.lang.String[] getComments()
getComments
in interface org.apache.openjpa.lib.xml.Commentable
public void setComments(java.lang.String[] comments)
setComments
in interface org.apache.openjpa.lib.xml.Commentable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |