Class DBQueryColumn

All Implemented Interfaces:
Column, ColumnExpr

public class DBQueryColumn extends DBColumn
  • Field Details

  • Constructor Details

    • DBQueryColumn

      public DBQueryColumn(DBQuery query, String name, DBColumnExpr expr)
      Constructs a DBQueryColumn object set the specified parameters to this object.

      Parameters:
      query - the DBQuery object
      name - the column name
      expr - the column expression object
  • Method Details

    • getExpr

      public DBColumnExpr getExpr()
    • 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
    • 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
    • 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
    • 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
    • getEnumType

      public Class<Enum<?>> getEnumType()
      Description copied from class: DBColumn
      Returns the enum type for this column
      Specified by:
      getEnumType in interface ColumnExpr
      Overrides:
      getEnumType in class DBColumn
      Returns:
      the enum type
    • 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
    • equals

      public boolean equals(Object other)
      Overrides the equals method
      Overrides:
      equals in class DBColumn
      Returns:
      true if alias name and expression match