Class AbstractStatementsWriter.AbstractTableStatement

java.lang.Object
org.fastnate.generator.statements.AbstractStatementsWriter.AbstractTableStatement
All Implemented Interfaces:
EntityStatement, TableStatement
Direct Known Subclasses:
AbstractStatementsWriter.InsertStatement, AbstractStatementsWriter.UpdateStatement
Enclosing class:
AbstractStatementsWriter

protected abstract static class AbstractStatementsWriter.AbstractTableStatement extends Object implements TableStatement
Base class for insert and update statements.
Author:
Tobias Liefke
  • Constructor Details

    • AbstractTableStatement

      public AbstractTableStatement(GeneratorDialect dialect, GeneratorTable table)
      Creates a new AbstractTableStatement instance.
      Parameters:
      dialect - The current database dialect
      table - The main table of this update / insert statement.
  • Method Details

    • reset

      public void reset()
      Resets the content of this statement to reuse it.
    • setColumnValue

      public void setColumnValue(GeneratorColumn column, ColumnExpression value)
      Sets the value for a specific column.
      Specified by:
      setColumnValue in interface TableStatement
      Parameters:
      column - the column name
      value - the value expression
    • toString

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

      public GeneratorDialect getDialect()
      The current database dialect
    • getTable

      public GeneratorTable getTable()
      The main table of this update / insert statement.
      Specified by:
      getTable in interface TableStatement
      Returns:
      the metadata of the table
    • getValues

      public Map<GeneratorColumn,ColumnExpression> getValues()
      The columns and their values.
    • isPlainExpressionAvailable

      public boolean isPlainExpressionAvailable()
      Indicates that at least one of the column expressions is not a primitive SQL value.