public class PreparedStatementManagerImpl extends Object implements PreparedStatementManager
Modifier and Type | Field and Description |
---|---|
protected Connection |
_conn |
protected DBDictionary |
_dict |
protected Collection<Exception> |
_exceptions |
protected Log |
_log |
protected JDBCStore |
_store |
Constructor and Description |
---|
PreparedStatementManagerImpl(JDBCStore store,
Connection conn)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected int |
executeUpdate(PreparedStatement stmnt,
String sql,
RowImpl row)
This method is to provide override for non-JDBC or JDBC-like
implementation of executing update.
|
void |
flush()
This method must be called after the last row has been
flushed, to flush any remaining statements.
|
void |
flush(RowImpl row)
Flush the given row.
|
protected void |
flushAndUpdate(RowImpl row)
Flush the given row immediately.
|
protected void |
flushInternal(RowImpl row)
Flush the given row.
|
protected String[] |
getAutoAssignColNames(Column[] autoAssign,
RowImpl row) |
protected Column[] |
getAutoAssignColumns(RowImpl row) |
Collection<Exception> |
getExceptions()
Return the exceptions encountered during all flushes.
|
protected List<Object> |
getGeneratedKeys(PreparedStatement stmnt,
DBIdentifier[] autoAssignColNames) |
protected List<Object> |
getGeneratedKeys(PreparedStatement stmnt,
String[] autoAssignColNames)
This method will only be called when the database supports
getGeneratedKeys.
|
protected void |
logSQLWarnings(PreparedStatement stmt)
Provided the JDBC log category is logging warnings, this method will
log any SQL warnings that result from the execution of a SQL statement.
|
protected void |
logSQLWarnings(Statement stmt) |
protected List<Object> |
populateAutoAssignCols(PreparedStatement stmnt,
Column[] autoAssign,
DBIdentifier[] autoAssignColNames,
RowImpl row)
This method will only be called when there is auto assign columns.
|
protected List<Object> |
populateAutoAssignCols(PreparedStatement stmnt,
Column[] autoAssign,
String[] autoAssignColNames,
RowImpl row) |
protected PreparedStatement |
prepareStatement(String sql)
This method is to provide override for non-JDBC or JDBC-like
implementation of preparing statement.
|
protected PreparedStatement |
prepareStatement(String sql,
String[] autoAssignColNames)
This method is to provide override for non-JDBC or JDBC-like
implementation of preparing statement.
|
protected void |
setObjectId(List vals,
Column[] autoAssign,
DBIdentifier[] autoAssignColNames,
RowImpl row) |
protected void |
setObjectId(List vals,
Column[] autoAssign,
String[] autoAssignColNames,
RowImpl row) |
protected final JDBCStore _store
protected final Connection _conn
protected final DBDictionary _dict
protected transient Log _log
protected final Collection<Exception> _exceptions
public PreparedStatementManagerImpl(JDBCStore store, Connection conn)
public Collection<Exception> getExceptions()
PreparedStatementManager
getExceptions
in interface PreparedStatementManager
public void flush(RowImpl row)
PreparedStatementManager
flush
in interface PreparedStatementManager
protected void flushInternal(RowImpl row) throws SQLException
SQLException
protected void flushAndUpdate(RowImpl row) throws SQLException
SQLException
protected List<Object> populateAutoAssignCols(PreparedStatement stmnt, Column[] autoAssign, DBIdentifier[] autoAssignColNames, RowImpl row) throws SQLException
SQLException
protected List<Object> populateAutoAssignCols(PreparedStatement stmnt, Column[] autoAssign, String[] autoAssignColNames, RowImpl row) throws SQLException
SQLException
protected void setObjectId(List vals, Column[] autoAssign, String[] autoAssignColNames, RowImpl row) throws SQLException
SQLException
protected void setObjectId(List vals, Column[] autoAssign, DBIdentifier[] autoAssignColNames, RowImpl row) throws SQLException
SQLException
protected List<Object> getGeneratedKeys(PreparedStatement stmnt, String[] autoAssignColNames) throws SQLException
SQLException
protected List<Object> getGeneratedKeys(PreparedStatement stmnt, DBIdentifier[] autoAssignColNames) throws SQLException
SQLException
public void flush()
PreparedStatementManager
flush
in interface PreparedStatementManager
protected int executeUpdate(PreparedStatement stmnt, String sql, RowImpl row) throws SQLException
SQLException
protected PreparedStatement prepareStatement(String sql) throws SQLException
SQLException
protected PreparedStatement prepareStatement(String sql, String[] autoAssignColNames) throws SQLException
SQLException
protected void logSQLWarnings(PreparedStatement stmt)
protected void logSQLWarnings(Statement stmt)
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.