|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ValueMapping
Specialization of value metadata for relational databases.
Field Summary | |
---|---|
static int |
JOIN_EXPECTED_INVERSE
Inverse join that is marked up as a forward join because the backing mapping expects an inverse direction. |
static int |
JOIN_FORWARD
Standard forward join. |
static int |
JOIN_INVERSE
Inverse join. |
static int |
POLY_FALSE
A non-polymorphic relation. |
static int |
POLY_JOINABLE
A relation that can hold any joinable subclass type. |
static int |
POLY_TRUE
A fully polymorphic relation (the default). |
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 |
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. |
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 polymorphic)
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 interface org.apache.openjpa.meta.MetaDataContext |
---|
getRepository |
Field Detail |
---|
static final int JOIN_FORWARD
static final int JOIN_INVERSE
static final int JOIN_EXPECTED_INVERSE
static final int POLY_TRUE
static final int POLY_FALSE
static final int POLY_JOINABLE
Method Detail |
---|
ValueMappingInfo getValueInfo()
ValueHandler getHandler()
void setHandler(ValueHandler handler)
MappingRepository getMappingRepository()
MetaDataContext.getRepository()
.
FieldMapping getFieldMapping()
ValueMetaData.getFieldMetaData()
.
ClassMapping getTypeMapping()
ValueMetaData.getTypeMetaData()
.
ClassMapping getDeclaredTypeMapping()
ValueMetaData.getDeclaredTypeMetaData()
.
ClassMapping getEmbeddedMapping()
ValueMetaData.getEmbeddedMetaData()
.
FieldMapping getValueMappedByMapping()
ValueMetaData.getValueMappedByMetaData()
.
Column[] getColumns()
void setColumns(Column[] cols)
ColumnIO getColumnIO()
void setColumnIO(ColumnIO io)
ForeignKey getForeignKey()
ForeignKey getForeignKey(ClassMapping target)
void setForeignKey(ForeignKey fk)
int getJoinDirection()
void setJoinDirection(int direction)
void setForeignKey(Row row, OpenJPAStateManager rel) throws SQLException
SQLException
void whereForeignKey(Row row, OpenJPAStateManager rel) throws SQLException
SQLException
ClassMapping[] getIndependentTypeMappings()
int getSelectSubclasses()
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.
Unique getValueUnique()
void setValueUnique(Unique unq)
Index getValueIndex()
void setValueIndex(Index idx)
boolean getUseClassCriteria()
void setUseClassCriteria(boolean criteria)
int getPolymorphic()
void setPolymorphic(int polymorphic)
void refSchemaComponents()
void mapConstraints(String name, boolean adapt)
ValueMappingInfo
. The foreign key or columns of this value
must be set before calling this method.
void clearMapping()
void syncMappingInfo()
MappingInfo
with our current mapping information.
void copyMappingInfo(ValueMapping vm)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |