Class ConnectedStatementsWriter.PreparedInsertStatement
java.lang.Object
org.fastnate.generator.statements.AbstractStatementsWriter.AbstractTableStatement
org.fastnate.generator.statements.AbstractStatementsWriter.InsertStatement
org.fastnate.generator.statements.ConnectedStatementsWriter.PreparedInsertStatement
- All Implemented Interfaces:
EntityStatement,TableStatement
- Enclosing class:
ConnectedStatementsWriter
private static final class ConnectedStatementsWriter.PreparedInsertStatement
extends AbstractStatementsWriter.InsertStatement
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BitSetprivate final intprivate final int[]private final Stringprivate final PreparedStatement -
Constructor Summary
ConstructorsConstructorDescriptionPreparedInsertStatement(GeneratorDialect dialect, Connection connection, GeneratorTable table) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()intintgetSql()voidreset()Resets the content of this statement to reuse it.voidsetColumnValue(GeneratorColumn column, ColumnExpression expression) Sets the value for a specific column.Methods inherited from class org.fastnate.generator.statements.AbstractStatementsWriter.InsertStatement
addColumns, toSqlMethods inherited from class org.fastnate.generator.statements.AbstractStatementsWriter.AbstractTableStatement
getDialect, getTable, getValues, isPlainExpressionAvailable, toString
-
Field Details
-
statement
-
columnCount
private final int columnCount -
sql
-
availableColumns
-
parameterIndices
private final int[] parameterIndices
-
-
Constructor Details
-
PreparedInsertStatement
PreparedInsertStatement(GeneratorDialect dialect, Connection connection, GeneratorTable table) throws SQLException - Throws:
SQLException
-
-
Method Details
-
close
- Throws:
SQLException
-
executeUpdate
- Throws:
SQLException
-
reset
public void reset()Description copied from class:AbstractStatementsWriter.AbstractTableStatementResets the content of this statement to reuse it.- Overrides:
resetin classAbstractStatementsWriter.AbstractTableStatement
-
setColumnValue
Description copied from class:AbstractStatementsWriter.AbstractTableStatementSets the value for a specific column.- Specified by:
setColumnValuein interfaceTableStatement- Overrides:
setColumnValuein classAbstractStatementsWriter.AbstractTableStatement- Parameters:
column- the column nameexpression- the value expression
-
getStatement
-
getColumnCount
public int getColumnCount() -
getSql
-