Class ColumnMetaData

java.lang.Object
org.datanucleus.metadata.MetaData
org.datanucleus.metadata.ColumnMetaData
All Implemented Interfaces:
Serializable

public class ColumnMetaData extends MetaData
Representation of the Meta-Data for a column mapping of a field.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • name

      protected String name
      column name.
    • target

      protected String target
      target column name (for matching across a FK).
    • targetMember

      protected String targetMember
      target field/property name (for matching across a FK).
    • jdbcType

      protected JdbcType jdbcType
      jdbc-type to use (if any).
    • sqlType

      protected String sqlType
      sql-type to use (if any). Takes priority over jdbc-type.
    • length

      protected Integer length
      length to use (if any). Also known as "precision" when for floating point types.
    • scale

      protected Integer scale
      scale to use (if any).
    • allowsNull

      protected Boolean allowsNull
      Whether the column accepts nulls.
    • defaultValue

      protected String defaultValue
      Default value for the column (when constructing the table with this column).
    • insertValue

      protected String insertValue
      value to use when inserting this column in the datastore (the column is not mapped to a field/property)
    • insertable

      protected boolean insertable
      Whether this column is to be inserted when the owning object is inserted. TODO Merge this with AbstractMemberMetaData.isInsertable.
    • updateable

      protected boolean updateable
      Whether this column can be updated when the owning object is updated. TODO Merge this with AbstractMemberMetaData.isUpdateable.
    • unique

      protected boolean unique
      Whether this column should be marked as UNIQUE.
    • columnDdl

      protected String columnDdl
      Optional column DDL appended to the column definition defined by DataNucleus.
    • position

      protected Integer position
      Column position for the table as a whole (0-origin).
  • Constructor Details

    • ColumnMetaData

      public ColumnMetaData(ColumnMetaData colmd)
      Creates a ColumnMetaData by copying contents from colmd.
      Parameters:
      colmd - MetaData for the column
    • ColumnMetaData

      public ColumnMetaData()
      Default constructor. Set the fields using setters, before populate().
  • Method Details