public class ValueMappingImpl extends ValueMetaDataImpl implements ValueMapping
ValueMapping implementation.JOIN_EXPECTED_INVERSE, JOIN_FORWARD, JOIN_INVERSE, POLY_FALSE, POLY_JOINABLE, POLY_TRUECASCADE_AUTO, CASCADE_IMMEDIATE, CASCADE_NONE, MAPPED_BY_PKMODE_ALL, MODE_ANN_MAPPING, MODE_MAPPING, MODE_MAPPING_INIT, MODE_META, MODE_NONE, MODE_QUERY| Modifier | Constructor and Description |
|---|---|
protected |
ValueMappingImpl()
Constructor for deserialization.
|
|
ValueMappingImpl(FieldMapping owner)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
ForeignKey |
getForeignKey(ClassMapping target,
int targetNumber) |
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 |
setForeignKey(Row row,
OpenJPAStateManager rel,
int targetNumber)
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.
|
addEmbeddedMetaData, addEmbeddedMetaData, getCascadeAttach, getCascadeDelete, getCascadeDetach, getCascadePersist, getCascadeRefresh, getDeclaredType, getDeclaredTypeCode, getDeclaredTypeMetaData, getEmbeddedMetaData, getFieldMetaData, getRepository, getResolve, getType, getTypeCode, getTypeMetaData, getTypeOverride, getValueMappedBy, getValueMappedByMetaData, isDeclaredTypePC, isEmbedded, isEmbeddedPC, isSerialized, isTypePC, setCascadeAttach, setCascadeDelete, setCascadeDetach, setCascadePersist, setCascadePersist, setCascadeRefresh, setDeclaredType, setDeclaredTypeCode, setEmbedded, setResolve, setResolve, setSerialized, setType, setTypeCode, setTypeOverride, setValueMappedBy, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddEmbeddedMetaData, addEmbeddedMetaData, getCascadeAttach, getCascadeDelete, getCascadeDetach, getCascadePersist, getCascadeRefresh, getDeclaredType, getDeclaredTypeCode, getDeclaredTypeMetaData, getEmbeddedMetaData, getFieldMetaData, getResolve, getType, getTypeCode, getTypeMetaData, getTypeOverride, getValueMappedBy, getValueMappedByMetaData, isDeclaredTypePC, isEmbedded, isEmbeddedPC, isSerialized, isTypePC, setCascadeAttach, setCascadeDelete, setCascadeDetach, setCascadePersist, setCascadePersist, setCascadeRefresh, setDeclaredType, setDeclaredTypeCode, setEmbedded, setResolve, setResolve, setSerialized, setType, setTypeCode, setTypeOverride, setValueMappedBygetRepositorypublic ValueMappingImpl(FieldMapping owner)
protected ValueMappingImpl()
public ValueMappingInfo getValueInfo()
ValueMappinggetValueInfo in interface ValueMappingpublic ValueHandler getHandler()
ValueMappinggetHandler in interface ValueMappingpublic void setHandler(ValueHandler handler)
ValueMappingsetHandler 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()
ValueMappinggetColumns in interface ValueMappingpublic void setColumns(Column[] cols)
ValueMappingsetColumns in interface ValueMappingpublic ColumnIO getColumnIO()
ValueMappinggetColumnIO in interface ValueMappingpublic void setColumnIO(ColumnIO io)
ValueMappingsetColumnIO in interface ValueMappingpublic ForeignKey getForeignKey()
ValueMappinggetForeignKey in interface ValueMappingpublic void setForeignKey(ForeignKey fk)
ValueMappingsetForeignKey in interface ValueMappingpublic ForeignKey getForeignKey(ClassMapping target, int targetNumber)
public ForeignKey getForeignKey(ClassMapping target)
ValueMappinggetForeignKey in interface ValueMappingpublic int getJoinDirection()
ValueMappinggetJoinDirection in interface ValueMappingpublic void setJoinDirection(int direction)
ValueMappingsetJoinDirection in interface ValueMappingpublic void setForeignKey(Row row, OpenJPAStateManager rel, int targetNumber) throws SQLException
ValueMappingsetForeignKey in interface ValueMappingSQLExceptionpublic void setForeignKey(Row row, OpenJPAStateManager rel) throws SQLException
ValueMappingsetForeignKey in interface ValueMappingSQLExceptionpublic void whereForeignKey(Row row, OpenJPAStateManager rel) throws SQLException
ValueMappingwhereForeignKey in interface ValueMappingSQLExceptionpublic ClassMapping[] getIndependentTypeMappings()
ValueMappinggetIndependentTypeMappings 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()
ValueMappinggetValueUnique in interface ValueMappingpublic void setValueUnique(Unique unq)
ValueMappingsetValueUnique in interface ValueMappingpublic Index getValueIndex()
ValueMappinggetValueIndex in interface ValueMappingpublic void setValueIndex(Index idx)
ValueMappingsetValueIndex in interface ValueMappingpublic boolean getUseClassCriteria()
ValueMappinggetUseClassCriteria in interface ValueMappingpublic void setUseClassCriteria(boolean criteria)
ValueMappingsetUseClassCriteria in interface ValueMappingpublic int getPolymorphic()
ValueMappinggetPolymorphic in interface ValueMappingpublic void setPolymorphic(int poly)
ValueMappingsetPolymorphic in interface ValueMappingpublic void refSchemaComponents()
ValueMappingrefSchemaComponents in interface ValueMapping@Deprecated 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 mapConstraints(DBIdentifier 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()
ValueMappingclearMapping in interface ValueMappingpublic void syncMappingInfo()
ValueMappingMappingInfo with our current mapping information.syncMappingInfo in interface ValueMappingpublic void copy(ValueMetaData vmd)
ValueMetaDatacopy in interface ValueMetaDatacopy in class ValueMetaDataImplpublic void copyMappingInfo(ValueMapping vm)
ValueMappingcopyMappingInfo in interface ValueMappingpublic boolean resolve(int mode)
ValueMetaDataresolve in interface ValueMetaDataresolve in class ValueMetaDataImplCopyright © 2006–2022 Apache Software Foundation. All rights reserved.