|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.meta.ValueMetaDataImpl
org.apache.openjpa.jdbc.meta.ValueMappingImpl
public class ValueMappingImpl
Standalone ValueMapping implementation.
| Field Summary |
|---|
| Fields inherited from interface org.apache.openjpa.jdbc.meta.ValueMapping |
|---|
JOIN_EXPECTED_INVERSE, JOIN_FORWARD, JOIN_INVERSE, POLY_FALSE, POLY_JOINABLE, POLY_TRUE |
| Fields inherited from interface org.apache.openjpa.meta.ValueMetaData |
|---|
CASCADE_AUTO, CASCADE_IMMEDIATE, CASCADE_NONE, MAPPED_BY_PK |
| Fields inherited from interface org.apache.openjpa.meta.MetaDataModes |
|---|
MODE_ALL, MODE_ANN_MAPPING, MODE_MAPPING, MODE_MAPPING_INIT, MODE_META, MODE_NONE, MODE_QUERY |
| Constructor Summary | |
|---|---|
protected |
ValueMappingImpl()
Constructor for deserialization. |
|
ValueMappingImpl(FieldMapping owner)
Constructor. |
| Method Summary | |
|---|---|
void |
clearMapping()
Clear mapping information, including strategy. |
void |
copyMappingInfo(ValueMapping vm)
Copy mapping info from the given instance to this one. |
ColumnIO |
getColumnIO()
I/O information on the foreign key, or columns if this value doesn't have a key. |
Column[] |
getColumns()
The columns that hold the data for this value. |
ClassMapping |
getDeclaredTypeMapping()
Convenience method to perform cast from ValueMetaData.getDeclaredTypeMetaData(). |
ClassMapping |
getEmbeddedMapping()
Convenience method to perform cast from ValueMetaData.getEmbeddedMetaData(). |
FieldMapping |
getFieldMapping()
Convenience method to perform cast from ValueMetaData.getFieldMetaData(). |
ForeignKey |
getForeignKey()
If this value joins to another record, the foreign key. |
ForeignKey |
getForeignKey(ClassMapping target)
Return an equivalent of this value's foreign key, but joining to the given target, which may be an unjoined subclass of this value's related type. |
ValueHandler |
getHandler()
The handler used for this value, or null if none. |
ClassMapping[] |
getIndependentTypeMappings()
Return all independently-mapped joinable types for this value, depending on whether this value is polymorphic and how the related type is mapped. |
int |
getJoinDirection()
The join direction. |
MappingRepository |
getMappingRepository()
Convenience method to perform cast from MetaDataContext.getRepository(). |
int |
getPolymorphic()
The degree to which this relation is polymorphic. |
int |
getSelectSubclasses()
Return the org.apache.openjpa.sql.Select subclasses constant
for loading this relation, based on how the related type is mapped,
whether this relation is polymorphic, and whether it is configured to
use class criteria. |
ClassMapping |
getTypeMapping()
Convenience method to perform cast from ValueMetaData.getTypeMetaData(). |
boolean |
getUseClassCriteria()
Whether to use class criteria when joining to related type. |
Index |
getValueIndex()
Index on this value's columns, or null if none. |
ValueMappingInfo |
getValueInfo()
Raw mapping data. |
FieldMapping |
getValueMappedByMapping()
Convenience method to perform cast from ValueMetaData.getValueMappedByMetaData(). |
Unique |
getValueUnique()
Unique constraint on this value's columns, or null if none. |
void |
mapConstraints(String name,
boolean adapt)
Map indexes and constraints for this value, using the current ValueMappingInfo. |
void |
refSchemaComponents()
Increase the reference count on used schema components. |
boolean |
resolve(int mode)
Resolve and validate metadata. |
void |
setColumnIO(ColumnIO io)
I/O information on the foreign key, or columns if this value doesn't have a key. |
void |
setColumns(Column[] cols)
The columns that hold the data for this value. |
void |
setForeignKey(ForeignKey fk)
If this value joins to another record, the foreign key. |
void |
setForeignKey(Row row,
OpenJPAStateManager rel)
Sets this value's foreign key to the given related object. |
void |
setHandler(ValueHandler handler)
The handler used for this value, or null if none. |
void |
setJoinDirection(int direction)
The join direction. |
void |
setPolymorphic(int poly)
The degree to which this relation is polymorphic. |
void |
setUseClassCriteria(boolean criteria)
Whether to use class criteria when joining to related type. |
void |
setValueIndex(Index idx)
Index on this value's columns, or null if none. |
void |
setValueUnique(Unique unq)
Unique constraint on this value's columns, or null if none. |
void |
syncMappingInfo()
Update MappingInfo with our current mapping information. |
void |
whereForeignKey(Row row,
OpenJPAStateManager rel)
Sets this value's foreign key to the given related object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.openjpa.meta.MetaDataContext |
|---|
getRepository |
| Constructor Detail |
|---|
public ValueMappingImpl(FieldMapping owner)
protected ValueMappingImpl()
| Method Detail |
|---|
public ValueMappingInfo getValueInfo()
ValueMapping
getValueInfo in interface ValueMappingpublic ValueHandler getHandler()
ValueMapping
getHandler in interface ValueMappingpublic void setHandler(ValueHandler handler)
ValueMapping
setHandler in interface ValueMappingpublic MappingRepository getMappingRepository()
ValueMappingMetaDataContext.getRepository().
getMappingRepository in interface ValueMappingpublic FieldMapping getFieldMapping()
ValueMappingValueMetaData.getFieldMetaData().
getFieldMapping in interface ValueMappingpublic ClassMapping getTypeMapping()
ValueMappingValueMetaData.getTypeMetaData().
getTypeMapping in interface ValueMappingpublic ClassMapping getDeclaredTypeMapping()
ValueMappingValueMetaData.getDeclaredTypeMetaData().
getDeclaredTypeMapping in interface ValueMappingpublic ClassMapping getEmbeddedMapping()
ValueMappingValueMetaData.getEmbeddedMetaData().
getEmbeddedMapping in interface ValueMappingpublic FieldMapping getValueMappedByMapping()
ValueMappingValueMetaData.getValueMappedByMetaData().
getValueMappedByMapping in interface ValueMappingpublic Column[] getColumns()
ValueMapping
getColumns in interface ValueMappingpublic void setColumns(Column[] cols)
ValueMapping
setColumns in interface ValueMappingpublic ColumnIO getColumnIO()
ValueMapping
getColumnIO in interface ValueMappingpublic void setColumnIO(ColumnIO io)
ValueMapping
setColumnIO in interface ValueMappingpublic ForeignKey getForeignKey()
ValueMapping
getForeignKey in interface ValueMappingpublic void setForeignKey(ForeignKey fk)
ValueMapping
setForeignKey in interface ValueMappingpublic ForeignKey getForeignKey(ClassMapping target)
ValueMapping
getForeignKey in interface ValueMappingpublic int getJoinDirection()
ValueMapping
getJoinDirection in interface ValueMappingpublic void setJoinDirection(int direction)
ValueMapping
setJoinDirection in interface ValueMapping
public void setForeignKey(Row row,
OpenJPAStateManager rel)
throws SQLException
ValueMapping
setForeignKey in interface ValueMappingSQLException
public void whereForeignKey(Row row,
OpenJPAStateManager rel)
throws SQLException
ValueMapping
whereForeignKey in interface ValueMappingSQLExceptionpublic ClassMapping[] getIndependentTypeMappings()
ValueMapping
getIndependentTypeMappings in interface ValueMappingpublic int getSelectSubclasses()
ValueMappingorg.apache.openjpa.sql.Select subclasses constant
for loading this relation, based on how the related type is mapped,
whether this relation is polymorphic, and whether it is configured to
use class criteria.
getSelectSubclasses in interface ValueMappingpublic Unique getValueUnique()
ValueMapping
getValueUnique in interface ValueMappingpublic void setValueUnique(Unique unq)
ValueMapping
setValueUnique in interface ValueMappingpublic Index getValueIndex()
ValueMapping
getValueIndex in interface ValueMappingpublic void setValueIndex(Index idx)
ValueMapping
setValueIndex in interface ValueMappingpublic boolean getUseClassCriteria()
ValueMapping
getUseClassCriteria in interface ValueMappingpublic void setUseClassCriteria(boolean criteria)
ValueMapping
setUseClassCriteria in interface ValueMappingpublic int getPolymorphic()
ValueMapping
getPolymorphic in interface ValueMappingpublic void setPolymorphic(int poly)
ValueMapping
setPolymorphic in interface ValueMappingpublic void refSchemaComponents()
ValueMapping
refSchemaComponents in interface ValueMapping
public void mapConstraints(String name,
boolean adapt)
ValueMappingValueMappingInfo. The foreign key or columns of this value
must be set before calling this method.
mapConstraints in interface ValueMappingpublic void clearMapping()
ValueMapping
clearMapping in interface ValueMappingpublic void syncMappingInfo()
ValueMappingMappingInfo with our current mapping information.
syncMappingInfo in interface ValueMappingpublic void copyMappingInfo(ValueMapping vm)
ValueMapping
copyMappingInfo in interface ValueMappingpublic boolean resolve(int mode)
ValueMetaData
resolve in interface ValueMetaDataresolve in class ValueMetaDataImpl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||