|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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. |
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,
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 MappingDefaultsgetStrategy in class MappingDefaultsImplvers - 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 MappingDefaultsgetStrategy in class MappingDefaultsImpldisc - 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 MappingDefaultsgetTableName in class MappingDefaultsImpl
public String getTableName(FieldMapping fm,
Schema schema)
MappingDefaults
getTableName in interface MappingDefaultsgetTableName in class MappingDefaultsImpl
public void populateJoinColumn(FieldMapping fm,
Table local,
Table foreign,
Column col,
Object target,
int pos,
int cols)
MappingDefaults
populateJoinColumn in interface MappingDefaultspopulateJoinColumn in class MappingDefaultsImpltarget - 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 key
public void populateForeignKeyColumn(ValueMapping vm,
String name,
Table local,
Table foreign,
Column col,
Object target,
boolean inverse,
int pos,
int cols)
MappingDefaults
populateForeignKeyColumn in interface MappingDefaultspopulateForeignKeyColumn in class MappingDefaultsImplname - 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 key
public void populateColumns(Version vers,
Table table,
Column[] cols)
MappingDefaults
populateColumns in interface MappingDefaultspopulateColumns in class MappingDefaultsImpl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||