Class EmbeddedPCMapping

All Implemented Interfaces:
MappingCallbacks

public class EmbeddedPCMapping extends EmbeddedMapping implements MappingCallbacks
Mapping for a PC object embedded within another PC object (1-1 relation). Provides mapping for a single Java type (the PC type) to multiple datastore columns. Allows for nested embedded fields. Implements MappingCallbacks since if we are embedding a MappingCallbacks field (e.g a BLOB on Oracle) then we need in turn to call the underlying MappingCallbacks methods.
  • Constructor Details

    • EmbeddedPCMapping

      public EmbeddedPCMapping()
  • Method Details

    • initialize

      public void initialize(org.datanucleus.metadata.AbstractMemberMetaData mmd, Table table, org.datanucleus.ClassLoaderResolver clr)
      Initialise this JavaTypeMapping with the given DatastoreAdapter for the given metadata.
      Overrides:
      initialize in class EmbeddedMapping
      Parameters:
      mmd - FieldMetaData for the field to be mapped (if any)
      table - The datastore container storing this mapping (if any)
      clr - the ClassLoaderResolver
    • postFetch

      public void postFetch(org.datanucleus.state.DNStateManager sm)
      Description copied from interface: MappingCallbacks
      Method called after the retrieval of the object, so that additional operations can be performed if necessary.
      Specified by:
      postFetch in interface MappingCallbacks
      Parameters:
      sm - StateManager of the owner
    • postInsert

      public void postInsert(org.datanucleus.state.DNStateManager sm)
      Description copied from interface: MappingCallbacks
      Method called after the insert of the object so that additional operations can be performed if necessary.
      Specified by:
      postInsert in interface MappingCallbacks
      Parameters:
      sm - StateManager of the owner
    • postUpdate

      public void postUpdate(org.datanucleus.state.DNStateManager sm)
      Description copied from interface: MappingCallbacks
      Method called after the update of the object, so that additional operations can be performed if necessary.
      Specified by:
      postUpdate in interface MappingCallbacks
      Parameters:
      sm - StateManager of the owner
    • preDelete

      public void preDelete(org.datanucleus.state.DNStateManager sm)
      Description copied from interface: MappingCallbacks
      Method called before the delete of objects, so that additional operations can be performed if necessary.
      Specified by:
      preDelete in interface MappingCallbacks
      Parameters:
      sm - StateManager of the owner
    • getStateManagerForEmbeddedObject

      private org.datanucleus.state.DNStateManager getStateManagerForEmbeddedObject(org.datanucleus.state.DNStateManager ownerSM)
      Accessor for StateManager of the embedded PC object when provided with the owner object.
      Parameters:
      ownerSM - StateManager of the owner
      Returns:
      StateManager of the embedded object