Class DBGeneratedValue.DBFuncGeneratedValue

Enclosing class:
DBGeneratedValue

public static class DBGeneratedValue.DBFuncGeneratedValue extends DBGeneratedValue
DBFuncGeneratedValue Auto-generates a record value from other record fields The template must contain the column names wrapped in square brackets like e.g. "normalize([name])" or "[lastName]+', '+[firstName]"
Author:
doebele
  • Constructor Details

    • DBFuncGeneratedValue

      public DBFuncGeneratedValue(DBTable table, String template)
  • Method Details

    • isModified

      public boolean isModified(Record record)
      Description copied from class: DBGeneratedValue
      Returns true if the value was modified and thus needs to be be updated in the record
      Specified by:
      isModified in class DBGeneratedValue
      Parameters:
      record - the record for which to check
      Returns:
      true if the value was modified and needs to be be updated
    • eval

      public Object eval(Record record)
      Description copied from class: DBGeneratedValue
      Evaluates a record and returns the generated value
      Specified by:
      eval in class DBGeneratedValue
      Parameters:
      record - the record for which to evaluate
      Returns:
      the generated value
    • addReferencedColumns

      public void addReferencedColumns(Set<DBColumn> list)
      Description copied from class: DBExpr
      Internal function to obtain all DBColumnExpr-objects used by this expression.
      Specified by:
      addReferencedColumns in class DBExpr
      Parameters:
      list - list to which all used column expressions must be added
    • addSQL

      public void addSQL(DBSQLBuilder sql, long context)
      Description copied from class: DBExpr
      Used to build the SQL command. SQL for this expression must be appended to StringBuilder.
      Specified by:
      addSQL in class DBExpr
      Parameters:
      sql - the string buffer used to build the sql command
      context - context flag for this SQL-Command (see CTX_??? constants).