Class ObjectMapping

  • All Implemented Interfaces:
    MappingCallbacks

    public class ObjectMapping
    extends ReferenceMapping
    Mapping for Object fields. An Object field can represent two things
    1. An object of a series of possible PC types ("implementation-classes") and each implementation type is represented in the datastore by a FK to the PC table
    2. An object of a series of possible non-PC types (e.g String, Long, Double etc) and each implementation type is represented in the datastore by a separate column
    • Constructor Detail

      • ObjectMapping

        public ObjectMapping()
    • Method Detail

      • getJavaType

        public Class getJavaType()
        Accessor for the Java type being represented.
        Overrides:
        getJavaType in class ReferenceMapping
        Returns:
        java.lang.Object
      • getJavaTypeForColumnMapping

        public String getJavaTypeForColumnMapping​(int index)
        Accessor for the name of the java-type actually used when mapping the particular datastore field. Returns Serializable since the object needs to be serialisable
        Overrides:
        getJavaTypeForColumnMapping in class ReferenceMapping
        Parameters:
        index - requested column index.
        Returns:
        the name of java-type for the requested column.