|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.mappings.DatabaseMapping
org.eclipse.persistence.mappings.ForeignReferenceMapping
org.eclipse.persistence.mappings.ObjectReferenceMapping
org.eclipse.persistence.eis.mappings.EISOneToOneMapping
public class EISOneToOneMapping
An EIS one-to-one mapping is a reference mapping that represents the relationship between a single source object and a single mapped persistent Java object. The source object usually contains a foreign key (pointer) to the target object (key on source); alternatively, the target object may contain a foreign key to the source object (key on target). Because both the source and target objects use interactions, they must both be configured as root object types.
Record Type | Description |
---|---|
Indexed | Ordered collection of record elements. The indexed record EIS format enables Java class attribute values to be retrieved by position or index. |
Mapped | Key-value map based representation of record elements. The mapped record EIS format enables Java class attribute values to be retrieved by an object key. |
XML | Record/Map representation of an XML DOM element. |
EISDescriptor.useIndexedRecordFormat()
,
EISDescriptor.useMappedRecordFormat()
,
EISDescriptor.useXMLRecordFormat()
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.persistence.mappings.DatabaseMapping |
---|
DatabaseMapping.WriteType |
Field Summary |
---|
Fields inherited from class org.eclipse.persistence.mappings.ForeignReferenceMapping |
---|
INNER_JOIN, NONE, OUTER_JOIN, QUERY_BATCH_PARAMETER |
Constructor Summary | |
---|---|
EISOneToOneMapping()
|
Method Summary | |
---|---|
void |
addForeignKeyField(org.eclipse.persistence.internal.helper.DatabaseField sourceForeignKeyField,
org.eclipse.persistence.internal.helper.DatabaseField targetKeyField)
PUBLIC: Define the source foreign key relationship in the one-to-one mapping. |
void |
addForeignKeyFieldName(String sourceForeignKeyFieldName,
String targetKeyFieldName)
PUBLIC: Define the source foreign key relationship in the one-to-one mapping. |
Object |
clone()
INTERNAL: This methods clones all the fields and ensures that each collection refers to the same clones. |
Object |
extractPrimaryKeysForReferenceObjectFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row)
INTERNAL: Return the primary key for the reference object (i.e. |
Class |
getFieldClassification(org.eclipse.persistence.internal.helper.DatabaseField fieldToClassify)
INTERNAL: Return the classifiction for the field contained in the mapping. |
Expression |
getPrivateOwnedCriteria()
INTERNAL: The private owned criteria is only used outside of the unit of work to compare the previous value of the reference. |
Map<org.eclipse.persistence.internal.helper.DatabaseField,org.eclipse.persistence.internal.helper.DatabaseField> |
getSourceToTargetKeyFields()
INTERNAL: Gets the foreign key fields. |
Map<org.eclipse.persistence.internal.helper.DatabaseField,org.eclipse.persistence.internal.helper.DatabaseField> |
getTargetToSourceKeyFields()
INTERNAL: Gets the target foreign key fields. |
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Initialize the mapping. |
boolean |
isEISMapping()
INTERNAL: |
boolean |
isOneToOneMapping()
INTERNAL: |
void |
setSelectionSQLString(String sqlString)
INTERNAL: This method is not supported in an EIS environment. |
void |
setShouldVerifyDelete(boolean shouldVerifyDelete)
PUBLIC: Verify delete is used during delete and update on private 1:1's outside of a unit of work only. |
void |
setSourceToTargetKeyFields(Map sourceToTargetKeyFields)
INTERNAL: Set the source keys to target keys fields association. |
void |
setTargetToSourceKeyFields(Map targetToSourceKeyFields)
INTERNAL: Set the source keys to target keys fields association. |
void |
setUsesBatchReading(boolean usesBatchReading)
INTERNAL: This method is not supported in an EIS environment. |
boolean |
shouldVerifyDelete()
PUBLIC: Verify delete is used during delete and update outside of a unit of work only. |
void |
useBatchReading()
INTERNAL: This method is not supported in an EIS environment. |
Object |
valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery query,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Return the value of the field from the row or a value holder on the query to obtain the object. |
void |
writeFromObjectIntoRow(Object object,
org.eclipse.persistence.internal.sessions.AbstractRecord Record,
org.eclipse.persistence.internal.sessions.AbstractSession session,
DatabaseMapping.WriteType writeType)
INTERNAL: Get a value from the object and set that in the respective field of the row. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EISOneToOneMapping()
Method Detail |
---|
public boolean isEISMapping()
isEISMapping
in class DatabaseMapping
public boolean isOneToOneMapping()
isOneToOneMapping
in class DatabaseMapping
public void addForeignKeyField(org.eclipse.persistence.internal.helper.DatabaseField sourceForeignKeyField, org.eclipse.persistence.internal.helper.DatabaseField targetKeyField)
public void addForeignKeyFieldName(String sourceForeignKeyFieldName, String targetKeyFieldName)
public Object clone()
clone
in class ForeignReferenceMapping
public Object extractPrimaryKeysForReferenceObjectFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row)
extractPrimaryKeysForReferenceObjectFromRow
in class ObjectReferenceMapping
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
initialize
in class ForeignReferenceMapping
DescriptorException
public Object valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery query, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DatabaseException
valueFromRow
in class ForeignReferenceMapping
DatabaseException
public void writeFromObjectIntoRow(Object object, org.eclipse.persistence.internal.sessions.AbstractRecord Record, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType)
writeFromObjectIntoRow
in class DatabaseMapping
public Class getFieldClassification(org.eclipse.persistence.internal.helper.DatabaseField fieldToClassify) throws DescriptorException
getFieldClassification
in class DatabaseMapping
DescriptorException
public Expression getPrivateOwnedCriteria()
public void setShouldVerifyDelete(boolean shouldVerifyDelete)
public boolean shouldVerifyDelete()
public Map<org.eclipse.persistence.internal.helper.DatabaseField,org.eclipse.persistence.internal.helper.DatabaseField> getSourceToTargetKeyFields()
public Map<org.eclipse.persistence.internal.helper.DatabaseField,org.eclipse.persistence.internal.helper.DatabaseField> getTargetToSourceKeyFields()
public void setSourceToTargetKeyFields(Map sourceToTargetKeyFields)
public void setTargetToSourceKeyFields(Map targetToSourceKeyFields)
public void setSelectionSQLString(String sqlString)
setSelectionSQLString
in class ForeignReferenceMapping
public void setUsesBatchReading(boolean usesBatchReading)
setUsesBatchReading
in class ForeignReferenceMapping
ForeignReferenceMapping.setBatchFetchType(BatchFetchType)
public void useBatchReading()
useBatchReading
in class ForeignReferenceMapping
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |