Class SingleFieldMultiMapping

java.lang.Object
org.datanucleus.store.rdbms.mapping.java.JavaTypeMapping
org.datanucleus.store.rdbms.mapping.java.SingleFieldMultiMapping
Direct Known Subclasses:
GregorianCalendarMapping, TypeConverterMultiMapping

public abstract class SingleFieldMultiMapping extends JavaTypeMapping
Mapping to represent a field that is mapped to multiple datastore columns.
  • Constructor Details

    • SingleFieldMultiMapping

      public SingleFieldMultiMapping()
  • Method Details

    • addColumns

      protected void addColumns(String typeName)
      Convenience method to add a column for this mapping. If this mapping is a "full" mapping (for a field in a table) then a Column will be added, otherwise (mapping representing a parameter in a query) will just add a datastore mapping. The column mapping is added to the end of the columnMappings.
      Parameters:
      typeName - Java type of the field to add the column for.
    • getJavaTypeForColumnMapping

      public String getJavaTypeForColumnMapping(int index)
      Accessor for the name of the java-type actually used when mapping the particular datastore field. This java-type must have an entry in the datastore mappings.
      Overrides:
      getJavaTypeForColumnMapping in class JavaTypeMapping
      Parameters:
      index - requested column index.
      Returns:
      the name of java-type for the requested column.
    • hasSimpleDatastoreRepresentation

      public boolean hasSimpleDatastoreRepresentation()
      Whether the mapping has a simple (single column) datastore representation.
      Overrides:
      hasSimpleDatastoreRepresentation in class JavaTypeMapping
      Returns:
      Whether it has a simple datastore representation (single column)