Class DBView.DBViewColumn

All Implemented Interfaces:
Column, ColumnExpr
Enclosing class:
DBView

public static class DBView.DBViewColumn extends DBColumn
DBViewColumn
Author:
doebele
  • Field Details

    • expr

      protected final DBColumnExpr expr
    • dataType

      protected final DataType dataType
    • updateColumn

      protected final DBColumn updateColumn
    • size

      protected final double size
  • Constructor Details

    • DBViewColumn

      protected DBViewColumn(DBView view, String name, DBColumnExpr expr, double size)
      Constructs a DBViewColumn object set the specified parameters to this object.
      Parameters:
      view - the DBView object
      name - the column name
      expr - the DBColumnExpr of the source table
      size - the column size
    • DBViewColumn

      protected DBViewColumn(DBView view, DBView.DBViewColumn other)
      Copy constructor
      Parameters:
      view - the copied view
      other - the column to copy
  • Method Details

    • getSourceColumnExpr

      public DBColumnExpr getSourceColumnExpr()
    • getView

      public DBView getView()
    • getDataType

      public DataType getDataType()
      Description copied from class: DBColumnExpr
      Returns the data type of this column expression.
      Specified by:
      getDataType in interface ColumnExpr
      Specified by:
      getDataType in class DBColumnExpr
      Returns:
      the expressions data type
      See Also:
    • getSize

      public double getSize()
      Description copied from class: DBColumn
      Returns the size of the column.
      Specified by:
      getSize in interface Column
      Specified by:
      getSize in class DBColumn
      Returns:
      Returns the size of the column
    • isAutoGenerated

      public boolean isAutoGenerated()
      Description copied from class: DBColumn
      Returns true if column is a columns value is an automatically generated value
      Specified by:
      isAutoGenerated in interface Column
      Specified by:
      isAutoGenerated in class DBColumn
      Returns:
      true if column is auto-generated
    • isReadOnly

      public boolean isReadOnly()
      Description copied from class: DBColumn
      Returns true if the column is read-only.
      Specified by:
      isReadOnly in interface Column
      Specified by:
      isReadOnly in class DBColumn
      Returns:
      Returns true if the column is read-only
    • isRequired

      public boolean isRequired()
      Description copied from class: DBColumn
      Returns true if the column is required.
      Specified by:
      isRequired in interface Column
      Specified by:
      isRequired in class DBColumn
      Returns:
      Returns true if the column is required
    • getAttribute

      public Object getAttribute(String name)
      Description copied from class: DBColumnExpr
      Returns the value of a column attribute. Column attributes are used to provide metadata for a column.
      Specified by:
      getAttribute in interface ColumnExpr
      Overrides:
      getAttribute in class DBColumn
      Parameters:
      name - the attribute name
      Returns:
      value of the attribute if it exists or null otherwise
      See Also:
    • getOptions

      public Options getOptions()
      Description copied from class: DBColumnExpr
      Returns the list of options for this column containing all possible field values.
      Specified by:
      getOptions in interface ColumnExpr
      Overrides:
      getOptions in class DBColumn
      Returns:
      the list of options
    • validateValue

      public Object validateValue(Object value)
      Description copied from class: DBColumn
      Checks if the given value is a valid value for this column If not, an exception is thrown
      Specified by:
      validateValue in interface Column
      Specified by:
      validateValue in class DBColumn
      Parameters:
      value - the value to validate
      Returns:
      the value the validated and possibly converted value
    • addXml

      public Element addXml(Element parent, long flags)
      Description copied from class: DBColumn
      Appends column meta information to the parent element
      Specified by:
      addXml in class DBColumn
      Parameters:
      parent - the parent element to which to append the column description
      flags - currently not used
      Returns:
      the newly created child element
    • setEnumOptions

      public void setEnumOptions(Class<? extends Enum<?>> enumType)
      sets the options from an enum class
      Parameters:
      enumType - the enum type