public class PreparedStatementManagerImpl extends java.lang.Object implements PreparedStatementManager
Modifier and Type | Field and Description |
---|---|
protected java.sql.Connection |
_conn |
protected DBDictionary |
_dict |
protected java.util.Collection<java.lang.Exception> |
_exceptions |
protected Log |
_log |
protected JDBCStore |
_store |
Constructor and Description |
---|
PreparedStatementManagerImpl(JDBCStore store,
java.sql.Connection conn)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected int |
executeUpdate(java.sql.PreparedStatement stmnt,
java.lang.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 java.lang.String[] |
getAutoAssignColNames(Column[] autoAssign,
RowImpl row) |
protected Column[] |
getAutoAssignColumns(RowImpl row) |
java.util.Collection<java.lang.Exception> |
getExceptions()
Return the exceptions encountered during all flushes.
|
protected java.util.List<java.lang.Object> |
getGeneratedKeys(java.sql.PreparedStatement stmnt,
DBIdentifier[] autoAssignColNames) |
protected java.util.List<java.lang.Object> |
getGeneratedKeys(java.sql.PreparedStatement stmnt,
java.lang.String[] autoAssignColNames)
This method will only be called when the database supports
getGeneratedKeys.
|
protected void |
logSQLWarnings(java.sql.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(java.sql.Statement stmt) |
protected java.util.List<java.lang.Object> |
populateAutoAssignCols(java.sql.PreparedStatement stmnt,
Column[] autoAssign,
DBIdentifier[] autoAssignColNames,
RowImpl row)
This method will only be called when there is auto assign columns.
|
protected java.util.List<java.lang.Object> |
populateAutoAssignCols(java.sql.PreparedStatement stmnt,
Column[] autoAssign,
java.lang.String[] autoAssignColNames,
RowImpl row) |
protected java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
This method is to provide override for non-JDBC or JDBC-like
implementation of preparing statement.
|
protected java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
java.lang.String[] autoAssignColNames)
This method is to provide override for non-JDBC or JDBC-like
implementation of preparing statement.
|
protected void |
setObjectId(java.util.List vals,
Column[] autoAssign,
DBIdentifier[] autoAssignColNames,
RowImpl row) |
protected void |
setObjectId(java.util.List vals,
Column[] autoAssign,
java.lang.String[] autoAssignColNames,
RowImpl row) |
protected final JDBCStore _store
protected final java.sql.Connection _conn
protected final DBDictionary _dict
protected transient Log _log
protected final java.util.Collection<java.lang.Exception> _exceptions
public PreparedStatementManagerImpl(JDBCStore store, java.sql.Connection conn)
public java.util.Collection<java.lang.Exception> getExceptions()
PreparedStatementManager
getExceptions
in interface PreparedStatementManager
public void flush(RowImpl row)
PreparedStatementManager
flush
in interface PreparedStatementManager
protected void flushInternal(RowImpl row) throws java.sql.SQLException
java.sql.SQLException
protected void flushAndUpdate(RowImpl row) throws java.sql.SQLException
java.sql.SQLException
protected java.util.List<java.lang.Object> populateAutoAssignCols(java.sql.PreparedStatement stmnt, Column[] autoAssign, DBIdentifier[] autoAssignColNames, RowImpl row) throws java.sql.SQLException
java.sql.SQLException
protected java.util.List<java.lang.Object> populateAutoAssignCols(java.sql.PreparedStatement stmnt, Column[] autoAssign, java.lang.String[] autoAssignColNames, RowImpl row) throws java.sql.SQLException
java.sql.SQLException
protected void setObjectId(java.util.List vals, Column[] autoAssign, java.lang.String[] autoAssignColNames, RowImpl row) throws java.sql.SQLException
java.sql.SQLException
protected void setObjectId(java.util.List vals, Column[] autoAssign, DBIdentifier[] autoAssignColNames, RowImpl row) throws java.sql.SQLException
java.sql.SQLException
protected java.util.List<java.lang.Object> getGeneratedKeys(java.sql.PreparedStatement stmnt, java.lang.String[] autoAssignColNames) throws java.sql.SQLException
java.sql.SQLException
protected java.util.List<java.lang.Object> getGeneratedKeys(java.sql.PreparedStatement stmnt, DBIdentifier[] autoAssignColNames) throws java.sql.SQLException
java.sql.SQLException
protected java.lang.String[] getAutoAssignColNames(Column[] autoAssign, RowImpl row)
public void flush()
PreparedStatementManager
flush
in interface PreparedStatementManager
protected int executeUpdate(java.sql.PreparedStatement stmnt, java.lang.String sql, RowImpl row) throws java.sql.SQLException
java.sql.SQLException
protected java.sql.PreparedStatement prepareStatement(java.lang.String sql) throws java.sql.SQLException
java.sql.SQLException
protected java.sql.PreparedStatement prepareStatement(java.lang.String sql, java.lang.String[] autoAssignColNames) throws java.sql.SQLException
java.sql.SQLException
protected void logSQLWarnings(java.sql.PreparedStatement stmt)
protected void logSQLWarnings(java.sql.Statement stmt)
Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.