|
|||||||||
| 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.CollectionMapping
org.eclipse.persistence.mappings.structures.NestedTableMapping
public class NestedTableMapping
Purpose:
Nested tables are similar to VARRAYs except internally they store their information in a separate table
from their parent structure's table. The advantage of nested tables is that they support querying and
joining much better than varrays that are inlined into the parent table. A nested table is typically
used to represent a one-to-many or many-to-many relationship of references to another independent
structure. TopLink supports storing a nested table of values into a single field.
NOTE: Only Oracle8i supports nested tables type.
| Nested 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 | |
|---|---|
NestedTableMapping()
PUBLIC: Default constructor. |
|
| Method Summary | |
|---|---|
Object |
clone()
INTERNAL: The mapping clones itself to create deep copy |
org.eclipse.persistence.internal.helper.DatabaseField |
getField()
INTERNAL: Returns the field which this mapping represents. |
String |
getFieldName()
PUBLIC: Return the name of the field this mapping represents. |
Expression |
getJoinCriteria(org.eclipse.persistence.internal.expressions.QueryKeyExpression exp)
INTERNAL: Join criteria is created to read target records (nested table) from the table. |
String |
getStructureName()
PUBLIC: Return the structure name of the nestedTable. |
boolean |
hasConstraintDependency()
INTERNAL: The returns if the mapping has any constraint dependencies, such as foreign keys and join tables. |
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Initialize the mapping. |
boolean |
isNestedTableMapping()
INTERNAL: |
void |
postInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Post Initialize the mapping. |
void |
preDelete(DeleteObjectQuery query)
INTERNAL: Delete privately owned parts |
void |
preInsert(WriteObjectQuery query)
INTERNAL: Insert privately owned parts |
void |
preUpdate(WriteObjectQuery writeQuery)
INTERNAL: Update the privately owned parts |
void |
setFieldName(String FieldName)
PUBLIC: Set the field name in the mapping. |
void |
setStructureName(String structureName)
PUBLIC: Set the name of the structure. |
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. |
void |
writeFromObjectIntoRowForShallowInsert(Object object,
org.eclipse.persistence.internal.sessions.AbstractRecord record,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: This row is built for shallow insert which happens in case of bidirectional inserts. |
void |
writeFromObjectIntoRowForShallowInsertWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
org.eclipse.persistence.internal.sessions.AbstractRecord record,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: This row is built for shallow insert which happens in case of bidirectional inserts. |
void |
writeFromObjectIntoRowForUpdate(WriteObjectQuery writeQuery,
org.eclipse.persistence.internal.sessions.AbstractRecord record)
INTERNAL: Write the entire structure into the row as a special type that prints as the constructor. |
void |
writeFromObjectIntoRowWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
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. |
void |
writeInsertFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord record,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Write fields needed for insert into the template for with null values. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NestedTableMapping()
| Method Detail |
|---|
public Object clone()
clone in class CollectionMappingpublic org.eclipse.persistence.internal.helper.DatabaseField getField()
getField in class DatabaseMappingpublic String getFieldName()
public Expression getJoinCriteria(org.eclipse.persistence.internal.expressions.QueryKeyExpression exp)
getJoinCriteria in class CollectionMappingpublic String getStructureName()
public boolean hasConstraintDependency()
hasConstraintDependency in class DatabaseMapping
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
initialize in class CollectionMappingDescriptorExceptionpublic boolean isNestedTableMapping()
isNestedTableMapping in class DatabaseMapping
public void postInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
postInitialize in class CollectionMappingDescriptorException
public void preDelete(DeleteObjectQuery query)
throws DatabaseException,
OptimisticLockException
preDelete in class DatabaseMappingDatabaseException
OptimisticLockException
public void preInsert(WriteObjectQuery query)
throws DatabaseException,
OptimisticLockException
preInsert in class CollectionMappingDatabaseException
OptimisticLockException
public void preUpdate(WriteObjectQuery writeQuery)
throws DatabaseException,
OptimisticLockException
preUpdate in class CollectionMappingDatabaseException
OptimisticLockExceptionpublic void setFieldName(String FieldName)
public void setStructureName(String structureName)
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 void writeFromObjectIntoRowWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
org.eclipse.persistence.internal.sessions.AbstractRecord record,
org.eclipse.persistence.internal.sessions.AbstractSession session,
DatabaseMapping.WriteType writeType)
writeFromObjectIntoRowWithChangeRecord in class DatabaseMapping
public void writeFromObjectIntoRowForShallowInsert(Object object,
org.eclipse.persistence.internal.sessions.AbstractRecord record,
org.eclipse.persistence.internal.sessions.AbstractSession session)
writeFromObjectIntoRowForShallowInsert in class DatabaseMapping
public void writeFromObjectIntoRowForShallowInsertWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
org.eclipse.persistence.internal.sessions.AbstractRecord record,
org.eclipse.persistence.internal.sessions.AbstractSession session)
writeFromObjectIntoRowForShallowInsertWithChangeRecord in class DatabaseMapping
public void writeFromObjectIntoRowForUpdate(WriteObjectQuery writeQuery,
org.eclipse.persistence.internal.sessions.AbstractRecord record)
throws DescriptorException
writeFromObjectIntoRowForUpdate in class DatabaseMappingDescriptorException
public void writeInsertFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord record,
org.eclipse.persistence.internal.sessions.AbstractSession session)
writeInsertFieldsIntoRow in class DatabaseMapping
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||