Class DBField

java.lang.Object
ch.autumo.beetroot.utils.database.DBField

public class DBField extends Object
DB field.
  • Field Details

    • LOG

      protected static final org.slf4j.Logger LOG
  • Constructor Details

    • DBField

      public DBField(String name, String type, boolean isNullable, boolean unique, String defaultVal)
      Constructor.
      Parameters:
      name - column name
      type - column type
      isNullable - is nullable?
      unique - is unique?
      defaultVal - column default value
  • Method Details

    • getDefaultVal

      public String getDefaultVal()
    • getName

      public String getName()
    • getType

      public String getType()
    • isUnique

      public boolean isUnique()
    • isNullable

      public boolean isNullable()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • serialize

      public String serialize(DBField field) throws com.fasterxml.jackson.core.JsonProcessingException
      Serialize this field to JSON.
      Parameters:
      field - field
      Returns:
      JSON string
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException - JSON processing exception