Class ColumnMetaData

  • All Implemented Interfaces:
    java.io.Serializable

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

      • name

        protected java.lang.String name
        column name.
      • target

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

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

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

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

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

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

        protected java.lang.Boolean allowsNull
        Whether the column accepts nulls.
      • defaultValue

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

        protected java.lang.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 java.lang.String columnDdl
        Optional column DDL appended to the column definition defined by DataNucleus.
      • position

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

      • 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 Detail

      • getDefaultValue

        public java.lang.String getDefaultValue()
      • setDefaultValue

        public ColumnMetaData setDefaultValue​(java.lang.String defaultValue)
      • getColumnDdl

        public java.lang.String getColumnDdl()
      • setColumnDdl

        public void setColumnDdl​(java.lang.String columnDdl)
      • getInsertable

        public boolean getInsertable()
      • setInsertable

        public ColumnMetaData setInsertable​(boolean insertable)
      • setInsertable

        public ColumnMetaData setInsertable​(java.lang.String insertable)
      • getInsertValue

        public java.lang.String getInsertValue()
      • setInsertValue

        public ColumnMetaData setInsertValue​(java.lang.String insertValue)
      • getJdbcType

        public JdbcType getJdbcType()
      • getJdbcTypeName

        public java.lang.String getJdbcTypeName()
      • setJdbcType

        public ColumnMetaData setJdbcType​(java.lang.String jdbcTypeName)
      • getLength

        public java.lang.Integer getLength()
      • setLength

        public ColumnMetaData setLength​(java.lang.Integer length)
      • setLength

        public ColumnMetaData setLength​(java.lang.String length)
      • getName

        public java.lang.String getName()
      • getScale

        public java.lang.Integer getScale()
      • setScale

        public ColumnMetaData setScale​(java.lang.Integer scale)
      • setScale

        public ColumnMetaData setScale​(java.lang.String scale)
      • getSqlType

        public java.lang.String getSqlType()
      • setSqlType

        public ColumnMetaData setSqlType​(java.lang.String sqlType)
      • getTarget

        public java.lang.String getTarget()
      • setTarget

        public ColumnMetaData setTarget​(java.lang.String target)
      • getTargetMember

        public java.lang.String getTargetMember()
      • setTargetMember

        public ColumnMetaData setTargetMember​(java.lang.String targetMember)
      • getPosition

        public java.lang.Integer getPosition()
      • setPosition

        public ColumnMetaData setPosition​(java.lang.String pos)
      • getUnique

        public boolean getUnique()
      • setUnique

        public ColumnMetaData setUnique​(java.lang.String unique)
      • getUpdateable

        public boolean getUpdateable()
      • setUpdateable

        public ColumnMetaData setUpdateable​(boolean updateable)
      • setUpdateable

        public ColumnMetaData setUpdateable​(java.lang.String updateable)
      • isAllowsNull

        public boolean isAllowsNull()
      • getAllowsNull

        public java.lang.Boolean getAllowsNull()
      • setAllowsNull

        public ColumnMetaData setAllowsNull​(java.lang.Boolean allowsNull)
      • setAllowsNull

        public ColumnMetaData setAllowsNull​(java.lang.String allowsNull)