Class PersistenceTableColumnModel

java.lang.Object
org.eclipse.dirigible.database.persistence.model.PersistenceTableColumnModel

public class PersistenceTableColumnModel
extends Object
The column element of the persistence model transport object.
  • Constructor Details

    • PersistenceTableColumnModel

      public PersistenceTableColumnModel​(String field, String name, String type, int length, boolean nullable, boolean primaryKey, int precision, int scale, String generated, boolean unique, boolean identity, String enumerated)
      The constructor from the fields.
      Parameters:
      field - the field
      name - the name
      type - the type
      length - the length
      nullable - whether null values are allowed
      primaryKey - whether it is a primary key
      precision - the precision for floating point values
      scale - the scale for floating point values
      generated - whether it is a generated value
      unique - whether it is unique
      identity - whether it is identity
      enumerated - whether it is enumerated
    • PersistenceTableColumnModel

      public PersistenceTableColumnModel()
      Empty constructor
    • PersistenceTableColumnModel

      public PersistenceTableColumnModel​(String name, String type, boolean primaryKey)
      The constructor from the fields.
      Parameters:
      name - the name
      type - the type
      primaryKey -
  • Method Details

    • getField

      public String getField()
      Getter for the field.
      Returns:
      the field
    • setField

      public void setField​(String field)
      Setter for the field.
      Parameters:
      field - the field
    • getName

      public String getName()
      Getter for the name.
      Returns:
      the name
    • setName

      public void setName​(String name)
      Setter for the name.
      Parameters:
      name - the name
    • getType

      public String getType()
      Getter for the type.
      Returns:
      the type
    • setType

      public void setType​(String type)
      Setter for the type.
      Parameters:
      type - the type
    • getLength

      public int getLength()
      Getter for the length.
      Returns:
      the length
    • setLength

      public void setLength​(int length)
      Setter for the length.
      Parameters:
      length - the length
    • isNullable

      public boolean isNullable()
      Check for nullable.
      Returns:
      true if can be null
    • setNullable

      public void setNullable​(boolean nullable)
      Setter for the nullable.
      Parameters:
      nullable - whether null values are allowed
    • isPrimaryKey

      public boolean isPrimaryKey()
      Check for primary key.
      Returns:
      true if primary key
    • setPrimaryKey

      public void setPrimaryKey​(boolean primaryKey)
      Setter for the primary key.
      Parameters:
      primaryKey - whether it is a primary key
    • getPrecision

      public int getPrecision()
      Getter for the precision.
      Returns:
      the precision
    • setPrecision

      public void setPrecision​(int precision)
      Setter for the precision.
      Parameters:
      precision - the precision
    • getScale

      public int getScale()
      Getter for the scale.
      Returns:
      the scale
    • setScale

      public void setScale​(int scale)
      Setter for the scale.
      Parameters:
      scale - the scale
    • getGenerated

      public String getGenerated()
      Check whether it is generated value.
      Returns:
      true if generated
    • setGenerated

      public void setGenerated​(String generated)
      Setter for the generated.
      Parameters:
      generated - whether it is generated
    • isUnique

      public boolean isUnique()
      Check whether it is unique value.
      Returns:
      true if unique
    • setUnique

      public void setUnique​(boolean unique)
      Setter for the unique.
      Parameters:
      unique - whether it is unique
    • isIdentity

      public boolean isIdentity()
      Check whether it is identity value.
      Returns:
      true if identity
    • setIdentity

      public void setIdentity​(boolean identity)
      Setter for the identity.
      Parameters:
      identity - whether it is identity
    • getEnumerated

      public String getEnumerated()
      Returns the name of the enumerated type in case the column is of type enumerated or null otherwise.
      Returns:
      enumerated type name
    • setEnumerated

      public void setEnumerated​(String enumerated)
      Setter for the enumerated type name.
      Parameters:
      enumerated - the new enumerated