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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final GeneratorDialectThe current database dialectprivate booleanIndicates that at least one of thecolumn expressionsis not aprimitive SQL value.private final GeneratorTableThe main table of this update / insert statement.private final Map<GeneratorColumn, ColumnExpression> The columns and their values. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractTableStatement(GeneratorDialect dialect, GeneratorTable table) Creates a newAbstractTableStatementinstance. -
Method Summary
Modifier and TypeMethodDescriptionThe current database dialectgetTable()The main table of this update / insert statement.The columns and their values.booleanIndicates that at least one of thecolumn expressionsis not aprimitive SQL value.voidreset()Resets the content of this statement to reuse it.voidsetColumnValue(GeneratorColumn column, ColumnExpression value) Sets the value for a specific column.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.fastnate.generator.statements.EntityStatement
toSql
-
Field Details
-
dialect
The current database dialect -
table
The main table of this update / insert statement. -
values
The columns and their values. -
plainExpressionAvailable
private boolean plainExpressionAvailableIndicates that at least one of thecolumn expressionsis not aprimitive SQL value.
-
-
Constructor Details
-
AbstractTableStatement
Creates a newAbstractTableStatementinstance.- Parameters:
dialect- The current database dialecttable- The main table of this update / insert statement.
-
-
Method Details
-
reset
public void reset()Resets the content of this statement to reuse it. -
setColumnValue
Sets the value for a specific column.- Specified by:
setColumnValuein interfaceTableStatement- Parameters:
column- the column namevalue- the value expression
-
toString
-
getDialect
The current database dialect -
getTable
The main table of this update / insert statement.- Specified by:
getTablein interfaceTableStatement- Returns:
- the metadata of the table
-
getValues
The columns and their values. -
isPlainExpressionAvailable
public boolean isPlainExpressionAvailable()Indicates that at least one of thecolumn expressionsis not aprimitive SQL value.
-