Class StructureMapping

java.lang.Object
org.eclipse.persistence.core.mappings.CoreMapping<AttributeAccessor,org.eclipse.persistence.internal.sessions.AbstractSession,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField>
All Implemented Interfaces:
Serializable, Cloneable

public class StructureMapping extends AbstractCompositeObjectMapping

Purpose: A structure is an object-relational user-defined data-type or object-type. A structure is similar to a Java class as it defines attributes or fields where each attribute is either a primitive data-type, another structure, an array, or a reference to another structure. The mapping is similar to an AggregateObjectMapping, as multiple objects are stored in a single table.

See Also:
  • Constructor Details

    • StructureMapping

      public StructureMapping()
      Default constructor.
  • Method Details

    • isStructureMapping

      public boolean isStructureMapping()
      INTERNAL:
      Overrides:
      isStructureMapping in class DatabaseMapping
    • getStructureName

      public String getStructureName()
      INTERNAL: Return the name of the structure. This is the name of the user-defined data type as defined on the database.
    • initialize

      public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
      INTERNAL: Initialize the mapping.
      Overrides:
      initialize in class AbstractCompositeObjectMapping
      Throws:
      DescriptorException
    • setFieldName

      public void setFieldName(String fieldName)
    • buildCompositeRow

      protected Object buildCompositeRow(Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.sessions.AbstractRecord Record, DatabaseMapping.WriteType writeType)
      Specified by:
      buildCompositeRow in class AbstractCompositeObjectMapping
    • buildCompositeObject

      protected Object buildCompositeObject(org.eclipse.persistence.internal.descriptors.ObjectBuilder objectBuilder, org.eclipse.persistence.internal.sessions.AbstractRecord nestedRow, ObjectBuildingQuery query, org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
      Specified by:
      buildCompositeObject in class AbstractCompositeObjectMapping
    • isRelationalMapping

      public boolean isRelationalMapping()
      INTERNAL:
      Overrides:
      isRelationalMapping in class DatabaseMapping