Class DBCommandExpr.DBCmdColumn

All Implemented Interfaces:
Column, ColumnExpr
Enclosing class:
DBCommandExpr

protected static class DBCommandExpr.DBCmdColumn extends DBColumn
This class wraps a column of sql command in a special command column object.
  • Constructor Details

    • DBCmdColumn

      public DBCmdColumn(DBRowSet query, DBColumnExpr expr)
      Constructs a new DBCmdColumn object
      Parameters:
      query - the row set
      expr - the column
  • Method Details

    • addSQL

      public void addSQL(DBSQLBuilder sql, long context)
      create the SQL-Command set the expression name to the SQL-Command
      Overrides:
      addSQL in class DBColumn
      Parameters:
      sql - the SQL-Command
      context - the current SQL-Command context
    • getDataType

      public DataType getDataType()
      Returns the data type of the DBColumnExpr object.
      Specified by:
      getDataType in interface ColumnExpr
      Specified by:
      getDataType in class DBColumnExpr
      Returns:
      the data type
      See Also:
    • getSize

      public double getSize()
      Not applicable - always returns 0.
      Specified by:
      getSize in interface Column
      Specified by:
      getSize in class DBColumn
      Returns:
      Returns the size of the column
    • isReadOnly

      public boolean isReadOnly()
      Not applicable - always returns true
      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()
      Not applicable - always returns false
      Specified by:
      isAutoGenerated in interface Column
      Specified by:
      isAutoGenerated in class DBColumn
      Returns:
      true if column is auto-generated
    • isRequired

      public boolean isRequired()
      Checks whether the column is mandatory.
      Specified by:
      isRequired in interface Column
      Specified by:
      isRequired in class DBColumn
      Returns:
      true if the column is mandatory or false otherwise
    • getAttribute

      public Object getAttribute(String name)
      Get Attributes of underlying table 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()
      Get Options of underlying table column.
      Specified by:
      getOptions in interface ColumnExpr
      Overrides:
      getOptions in class DBColumn
      Returns:
      the list of options
    • validateValue

      public Object validateValue(Object value)
      Not applicable - always return the value.
      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)
      Adds the expression definition to the xml 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