|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.jdbc.meta.MappingDefaultsImpl org.apache.openjpa.persistence.jdbc.PersistenceMappingDefaults
public class PersistenceMappingDefaults
Supplies default mapping information in accordance with JPA spec.
Field Summary |
---|
Fields inherited from class org.apache.openjpa.jdbc.meta.MappingDefaultsImpl |
---|
dict |
Constructor Summary | |
---|---|
PersistenceMappingDefaults()
|
Method Summary | |
---|---|
boolean |
getPrependFieldNameToJoinTableInverseJoinColumns()
Whether to prepend the field name to the default name of inverse join columns within join tables. |
Object |
getStrategy(Discriminator disc,
boolean adapt)
Default discriminator mapping strategy when there is no explicit strategy. |
Object |
getStrategy(Version vers,
boolean adapt)
Default version mapping strategy when there is no explicit strategy. |
DBIdentifier |
getTableIdentifier(FieldMapping fm,
Schema schema)
Return the default secondary table name for the given field. |
String |
getTableName(ClassMapping cls,
Schema schema)
Return the default table name for the given class. |
String |
getTableName(FieldMapping fm,
Schema schema)
Return the default secondary table name for the given field. |
void |
populateColumns(Version vers,
Table table,
Column[] cols)
Fill in default information for the given version columns. |
void |
populateForeignKeyColumn(ValueMapping vm,
DBIdentifier sName,
Table local,
Table foreign,
Column col,
Object target,
boolean inverse,
int pos,
int cols)
Fill in default information for the given column used to join a value to its related type. |
void |
populateForeignKeyColumn(ValueMapping vm,
String name,
Table local,
Table foreign,
Column col,
Object target,
boolean inverse,
int pos,
int cols)
Fill in default information for the given column used to join a value to its related type. |
void |
populateJoinColumn(FieldMapping fm,
Table local,
Table foreign,
Column col,
Object target,
int pos,
int cols)
Fill in default information for the given column used to join a field to its defining class' table. |
void |
setPrependFieldNameToJoinTableInverseJoinColumns(boolean val)
Whether to prepend the field name to the default name of inverse join columns within join tables. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PersistenceMappingDefaults()
Method Detail |
---|
public boolean getPrependFieldNameToJoinTableInverseJoinColumns()
public void setPrependFieldNameToJoinTableInverseJoinColumns(boolean val)
public Object getStrategy(Version vers, boolean adapt)
MappingDefaults
getStrategy
in interface MappingDefaults
getStrategy
in class MappingDefaultsImpl
vers
- the version; will not be mapped, but raw
MappingInfo
will be availableadapt
- whether we can adapt the mapping or schema
public Object getStrategy(Discriminator disc, boolean adapt)
MappingDefaults
getStrategy
in interface MappingDefaults
getStrategy
in class MappingDefaultsImpl
disc
- the discriminator; will not be mapped, but raw
MappingInfo
will be availableadapt
- whether we can adapt the mapping or schema
public String getTableName(ClassMapping cls, Schema schema)
MappingDefaults
getTableName
in interface MappingDefaults
getTableName
in class MappingDefaultsImpl
public String getTableName(FieldMapping fm, Schema schema)
MappingDefaults
getTableName
in interface MappingDefaults
getTableName
in class MappingDefaultsImpl
public DBIdentifier getTableIdentifier(FieldMapping fm, Schema schema)
MappingDefaults
getTableIdentifier
in interface MappingDefaults
getTableIdentifier
in class MappingDefaultsImpl
public void populateJoinColumn(FieldMapping fm, Table local, Table foreign, Column col, Object target, int pos, int cols)
MappingDefaults
populateJoinColumn
in interface MappingDefaults
populateJoinColumn
in class MappingDefaultsImpl
target
- the target of this column in the join; may be
another column or a constant valuepos
- the index of this column in the logical foreign keycols
- the number of columns in the logical foreign keypublic void populateForeignKeyColumn(ValueMapping vm, String name, Table local, Table foreign, Column col, Object target, boolean inverse, int pos, int cols)
MappingDefaults
populateForeignKeyColumn
in interface MappingDefaults
populateForeignKeyColumn
in class MappingDefaultsImpl
name
- base name for value, as decided by mappingtarget
- the target of this column in the join; may be
another column or a constant valueinverse
- whether this is an inverse foreign keypos
- the index of this column in the logical foreign keycols
- the number of columns in the logical foreign keypublic void populateForeignKeyColumn(ValueMapping vm, DBIdentifier sName, Table local, Table foreign, Column col, Object target, boolean inverse, int pos, int cols)
MappingDefaults
populateForeignKeyColumn
in interface MappingDefaults
populateForeignKeyColumn
in class MappingDefaultsImpl
sName
- base name for value, as decided by mappingtarget
- the target of this column in the join; may be
another column or a constant valueinverse
- whether this is an inverse foreign keypos
- the index of this column in the logical foreign keycols
- the number of columns in the logical foreign keypublic void populateColumns(Version vers, Table table, Column[] cols)
MappingDefaults
populateColumns
in interface MappingDefaults
populateColumns
in class MappingDefaultsImpl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |