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 Details

    • ObjectMapping

      public ObjectMapping()
  • Method Details

    • getJavaType

      public Class getJavaType()
      Description copied from class: JavaTypeMapping
      Accessor for the java type being mapped. This is the java type that the mapping represents. Some examples :
      • if the field is of type "MyClass" then the mapping will be OIDMapping (or subclass) the javaType will be OID, and the type will be MyClass.
      • if the field is of type "int" then the mapping will be IntegerMapping, the javaType will be Integer, and the type will be int.
      The "java type" is the java-type name used in the plugin.xml mapping file
      Overrides:
      getJavaType in class ReferenceMapping
      Returns:
      The java type
    • 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.