|
||||||||||
| 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. |
String |
getClassName()
The described class name. |
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. |
String |
getResourceName()
Return the domain-meaningful name of the resource that was loaded from this source. |
String |
getSchemaName()
The default schema name for unqualified tables. |
List |
getSecondaryTableJoinColumns(String tableName)
Return any columns defined for the given class level join, or empty list if none. |
String |
getSecondaryTableName(String tableName)
We allow fields to reference class-level joins using just the table name, whereas the class join might have schema, etc information. |
String[] |
getSecondaryTableNames()
Return the class-level joined tables. |
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 table for the given class. |
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(String name)
The described class name. |
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 |
setSchemaName(String schema)
The default schema name for unqualified tables. |
void |
setSecondaryTableJoinColumns(String tableName,
List cols)
Declare the given class-level join. |
void |
setSource(File file,
int srcType)
|
void |
setTableName(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 String getClassName()
public void setClassName(String name)
public String getHierarchyStrategy()
public void setHierarchyStrategy(String strategy)
public String getTableName()
public void setTableName(String table)
public String getSchemaName()
public void setSchemaName(String schema)
public boolean isJoinedSubclass()
public void setJoinedSubclass(boolean joined)
public String[] getSecondaryTableNames()
public String getSecondaryTableName(String tableName)
public List getSecondaryTableJoinColumns(String tableName)
public void setSecondaryTableJoinColumns(String tableName,
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 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 MappingInfopublic void addUnique(Unique unique)
public Unique[] getUniques()
public Unique[] getUniques(ClassMapping cm,
boolean adapt)
public File getSourceFile()
SourceTracker
getSourceFile in interface SourceTrackerpublic Object getSourceScope()
SourceTracker
getSourceScope in interface SourceTrackerpublic int getSourceType()
SourceTracker
getSourceType in interface SourceTracker
public void setSource(File file,
int srcType)
public String getResourceName()
SourceTracker
getResourceName in interface SourceTrackerpublic String[] getComments()
Commentable
getComments in interface Commentablepublic void setComments(String[] comments)
Commentable
setComments in interface Commentable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||