|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 |
copy(ValueMetaData vmd)
Copy state from the given value to this one. |
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(DBIdentifier name,
boolean adapt)
Map indexes and constraints for this value, using the current ValueMappingInfo . |
void |
mapConstraints(String name,
boolean adapt)
Deprecated. |
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 ValueMapping
public ValueHandler getHandler()
ValueMapping
getHandler
in interface ValueMapping
public void setHandler(ValueHandler handler)
ValueMapping
setHandler
in interface ValueMapping
public MappingRepository getMappingRepository()
ValueMapping
MetaDataContext.getRepository()
.
getMappingRepository
in interface ValueMapping
public FieldMapping getFieldMapping()
ValueMapping
ValueMetaData.getFieldMetaData()
.
getFieldMapping
in interface ValueMapping
public ClassMapping getTypeMapping()
ValueMapping
ValueMetaData.getTypeMetaData()
.
getTypeMapping
in interface ValueMapping
public ClassMapping getDeclaredTypeMapping()
ValueMapping
ValueMetaData.getDeclaredTypeMetaData()
.
getDeclaredTypeMapping
in interface ValueMapping
public ClassMapping getEmbeddedMapping()
ValueMapping
ValueMetaData.getEmbeddedMetaData()
.
getEmbeddedMapping
in interface ValueMapping
public FieldMapping getValueMappedByMapping()
ValueMapping
ValueMetaData.getValueMappedByMetaData()
.
getValueMappedByMapping
in interface ValueMapping
public Column[] getColumns()
ValueMapping
getColumns
in interface ValueMapping
public void setColumns(Column[] cols)
ValueMapping
setColumns
in interface ValueMapping
public ColumnIO getColumnIO()
ValueMapping
getColumnIO
in interface ValueMapping
public void setColumnIO(ColumnIO io)
ValueMapping
setColumnIO
in interface ValueMapping
public ForeignKey getForeignKey()
ValueMapping
getForeignKey
in interface ValueMapping
public void setForeignKey(ForeignKey fk)
ValueMapping
setForeignKey
in interface ValueMapping
public ForeignKey getForeignKey(ClassMapping target)
ValueMapping
getForeignKey
in interface ValueMapping
public int getJoinDirection()
ValueMapping
getJoinDirection
in interface ValueMapping
public void setJoinDirection(int direction)
ValueMapping
setJoinDirection
in interface ValueMapping
public void setForeignKey(Row row, OpenJPAStateManager rel) throws SQLException
ValueMapping
setForeignKey
in interface ValueMapping
SQLException
public void whereForeignKey(Row row, OpenJPAStateManager rel) throws SQLException
ValueMapping
whereForeignKey
in interface ValueMapping
SQLException
public ClassMapping[] getIndependentTypeMappings()
ValueMapping
getIndependentTypeMappings
in interface ValueMapping
public int getSelectSubclasses()
ValueMapping
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.
getSelectSubclasses
in interface ValueMapping
public Unique getValueUnique()
ValueMapping
getValueUnique
in interface ValueMapping
public void setValueUnique(Unique unq)
ValueMapping
setValueUnique
in interface ValueMapping
public Index getValueIndex()
ValueMapping
getValueIndex
in interface ValueMapping
public void setValueIndex(Index idx)
ValueMapping
setValueIndex
in interface ValueMapping
public boolean getUseClassCriteria()
ValueMapping
getUseClassCriteria
in interface ValueMapping
public void setUseClassCriteria(boolean criteria)
ValueMapping
setUseClassCriteria
in interface ValueMapping
public int getPolymorphic()
ValueMapping
getPolymorphic
in interface ValueMapping
public void setPolymorphic(int poly)
ValueMapping
setPolymorphic
in interface ValueMapping
public void refSchemaComponents()
ValueMapping
refSchemaComponents
in interface ValueMapping
public void mapConstraints(String name, boolean adapt)
ValueMapping
ValueMappingInfo
. The foreign key or columns of this value
must be set before calling this method.
mapConstraints
in interface ValueMapping
public void mapConstraints(DBIdentifier name, boolean adapt)
ValueMapping
ValueMappingInfo
. The foreign key or columns of this value
must be set before calling this method.
mapConstraints
in interface ValueMapping
public void clearMapping()
ValueMapping
clearMapping
in interface ValueMapping
public void syncMappingInfo()
ValueMapping
MappingInfo
with our current mapping information.
syncMappingInfo
in interface ValueMapping
public void copy(ValueMetaData vmd)
ValueMetaData
copy
in interface ValueMetaData
copy
in class ValueMetaDataImpl
public void copyMappingInfo(ValueMapping vm)
ValueMapping
copyMappingInfo
in interface ValueMapping
public boolean resolve(int mode)
ValueMetaData
resolve
in interface ValueMetaData
resolve
in class ValueMetaDataImpl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |