Package org.apache.openjpa.slice.jdbc
Class DistributedPreparedStatement
- java.lang.Object
-
- org.apache.openjpa.slice.jdbc.DistributedTemplate<PreparedStatement>
-
- org.apache.openjpa.slice.jdbc.DistributedPreparedStatement
-
- All Implemented Interfaces:
AutoCloseable,Iterable<PreparedStatement>,PreparedStatement,Statement,Wrapper
public class DistributedPreparedStatement extends DistributedTemplate<PreparedStatement> implements PreparedStatement
A virtual PreparedStaement that delegates to a set of actual PreparedStatements.- Author:
- Pinaki Poddar
-
-
Field Summary
-
Fields inherited from class org.apache.openjpa.slice.jdbc.DistributedTemplate
con, master, stmts
-
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
-
-
Constructor Summary
Constructors Constructor Description DistributedPreparedStatement(DistributedConnection c)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBatch()voidclearParameters()voidcloseOnCompletion()booleanexecute()ResultSetexecuteQuery()intexecuteUpdate()ResultSetMetaDatagetMetaData()ParameterMetaDatagetParameterMetaData()booleanisCloseOnCompletion()voidsetArray(int i, Array x)voidsetAsciiStream(int arg0, InputStream arg1)voidsetAsciiStream(int arg0, InputStream arg1, int arg2)voidsetAsciiStream(int arg0, InputStream arg1, long arg2)voidsetBigDecimal(int arg0, BigDecimal arg1)voidsetBinaryStream(int arg0, InputStream arg1)voidsetBinaryStream(int arg0, InputStream arg1, int arg2)voidsetBinaryStream(int arg0, InputStream arg1, long arg2)voidsetBlob(int arg0, InputStream arg1)voidsetBlob(int arg0, InputStream arg1, long arg2)voidsetBlob(int arg0, Blob arg1)voidsetBoolean(int arg0, boolean arg1)voidsetByte(int arg0, byte arg1)voidsetBytes(int arg0, byte[] arg1)voidsetCharacterStream(int arg0, Reader arg1)voidsetCharacterStream(int arg0, Reader arg1, int arg2)voidsetCharacterStream(int arg0, Reader arg1, long arg2)voidsetClob(int arg0, Reader arg1)voidsetClob(int arg0, Reader arg1, long arg2)voidsetClob(int arg0, Clob arg1)voidsetDate(int arg0, Date arg1)voidsetDate(int arg0, Date arg1, Calendar arg2)voidsetDouble(int arg0, double arg1)voidsetFloat(int arg0, float arg1)voidsetInt(int arg0, int arg1)voidsetLong(int arg0, long arg1)voidsetNCharacterStream(int arg0, Reader arg1)voidsetNCharacterStream(int arg0, Reader arg1, long arg2)voidsetNClob(int arg0, Reader arg1)voidsetNClob(int arg0, Reader arg1, long arg2)voidsetNClob(int arg0, NClob arg1)voidsetNString(int arg0, String arg1)voidsetNull(int arg0, int arg1)voidsetNull(int arg0, int arg1, String arg2)voidsetObject(int arg0, Object arg1)voidsetObject(int arg0, Object arg1, int arg2)voidsetObject(int arg0, Object arg1, int arg2, int arg3)voidsetRef(int arg0, Ref arg1)voidsetRowId(int arg0, RowId arg1)voidsetShort(int arg0, short arg1)voidsetSQLXML(int arg0, SQLXML arg1)voidsetString(int arg0, String arg1)voidsetTime(int arg0, Time arg1)voidsetTime(int arg0, Time arg1, Calendar arg2)voidsetTimestamp(int arg0, Timestamp arg1)voidsetTimestamp(int arg0, Timestamp arg1, Calendar arg2)voidsetUnicodeStream(int arg0, InputStream arg1, int arg2)voidsetURL(int arg0, URL arg1)-
Methods inherited from class org.apache.openjpa.slice.jdbc.DistributedTemplate
add, addBatch, cancel, clearBatch, clearWarnings, close, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isPoolable, isWrapperFor, iterator, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, unwrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface java.sql.PreparedStatement
executeLargeUpdate, setObject, setObject
-
Methods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isPoolable, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout
-
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
-
-
-
Constructor Detail
-
DistributedPreparedStatement
public DistributedPreparedStatement(DistributedConnection c)
-
-
Method Detail
-
clearParameters
public void clearParameters() throws SQLException- Specified by:
clearParametersin interfacePreparedStatement- Throws:
SQLException
-
execute
public boolean execute() throws SQLException- Specified by:
executein interfacePreparedStatement- Throws:
SQLException
-
executeQuery
public ResultSet executeQuery() throws SQLException
- Specified by:
executeQueryin interfacePreparedStatement- Overrides:
executeQueryin classDistributedTemplate<PreparedStatement>- Throws:
SQLException
-
executeUpdate
public int executeUpdate() throws SQLException- Specified by:
executeUpdatein interfacePreparedStatement- Throws:
SQLException
-
getMetaData
public ResultSetMetaData getMetaData() throws SQLException
- Specified by:
getMetaDatain interfacePreparedStatement- Throws:
SQLException
-
getParameterMetaData
public ParameterMetaData getParameterMetaData() throws SQLException
- Specified by:
getParameterMetaDatain interfacePreparedStatement- Throws:
SQLException
-
setArray
public void setArray(int i, Array x) throws SQLException- Specified by:
setArrayin interfacePreparedStatement- Throws:
SQLException
-
setAsciiStream
public void setAsciiStream(int arg0, InputStream arg1, int arg2) throws SQLException- Specified by:
setAsciiStreamin interfacePreparedStatement- Throws:
SQLException
-
setBigDecimal
public void setBigDecimal(int arg0, BigDecimal arg1) throws SQLException- Specified by:
setBigDecimalin interfacePreparedStatement- Throws:
SQLException
-
setBinaryStream
public void setBinaryStream(int arg0, InputStream arg1, int arg2) throws SQLException- Specified by:
setBinaryStreamin interfacePreparedStatement- Throws:
SQLException
-
setBlob
public void setBlob(int arg0, Blob arg1) throws SQLException- Specified by:
setBlobin interfacePreparedStatement- Throws:
SQLException
-
setBoolean
public void setBoolean(int arg0, boolean arg1) throws SQLException- Specified by:
setBooleanin interfacePreparedStatement- Throws:
SQLException
-
setByte
public void setByte(int arg0, byte arg1) throws SQLException- Specified by:
setBytein interfacePreparedStatement- Throws:
SQLException
-
setBytes
public void setBytes(int arg0, byte[] arg1) throws SQLException- Specified by:
setBytesin interfacePreparedStatement- Throws:
SQLException
-
setCharacterStream
public void setCharacterStream(int arg0, Reader arg1, int arg2) throws SQLException- Specified by:
setCharacterStreamin interfacePreparedStatement- Throws:
SQLException
-
setClob
public void setClob(int arg0, Clob arg1) throws SQLException- Specified by:
setClobin interfacePreparedStatement- Throws:
SQLException
-
setDate
public void setDate(int arg0, Date arg1) throws SQLException- Specified by:
setDatein interfacePreparedStatement- Throws:
SQLException
-
setDate
public void setDate(int arg0, Date arg1, Calendar arg2) throws SQLException- Specified by:
setDatein interfacePreparedStatement- Throws:
SQLException
-
setDouble
public void setDouble(int arg0, double arg1) throws SQLException- Specified by:
setDoublein interfacePreparedStatement- Throws:
SQLException
-
setFloat
public void setFloat(int arg0, float arg1) throws SQLException- Specified by:
setFloatin interfacePreparedStatement- Throws:
SQLException
-
setInt
public void setInt(int arg0, int arg1) throws SQLException- Specified by:
setIntin interfacePreparedStatement- Throws:
SQLException
-
setLong
public void setLong(int arg0, long arg1) throws SQLException- Specified by:
setLongin interfacePreparedStatement- Throws:
SQLException
-
setNull
public void setNull(int arg0, int arg1) throws SQLException- Specified by:
setNullin interfacePreparedStatement- Throws:
SQLException
-
setNull
public void setNull(int arg0, int arg1, String arg2) throws SQLException- Specified by:
setNullin interfacePreparedStatement- Throws:
SQLException
-
setObject
public void setObject(int arg0, Object arg1) throws SQLException- Specified by:
setObjectin interfacePreparedStatement- Throws:
SQLException
-
setObject
public void setObject(int arg0, Object arg1, int arg2) throws SQLException- Specified by:
setObjectin interfacePreparedStatement- Throws:
SQLException
-
setObject
public void setObject(int arg0, Object arg1, int arg2, int arg3) throws SQLException- Specified by:
setObjectin interfacePreparedStatement- Throws:
SQLException
-
setRef
public void setRef(int arg0, Ref arg1) throws SQLException- Specified by:
setRefin interfacePreparedStatement- Throws:
SQLException
-
setShort
public void setShort(int arg0, short arg1) throws SQLException- Specified by:
setShortin interfacePreparedStatement- Throws:
SQLException
-
setString
public void setString(int arg0, String arg1) throws SQLException- Specified by:
setStringin interfacePreparedStatement- Throws:
SQLException
-
setTime
public void setTime(int arg0, Time arg1) throws SQLException- Specified by:
setTimein interfacePreparedStatement- Throws:
SQLException
-
setTime
public void setTime(int arg0, Time arg1, Calendar arg2) throws SQLException- Specified by:
setTimein interfacePreparedStatement- Throws:
SQLException
-
setTimestamp
public void setTimestamp(int arg0, Timestamp arg1) throws SQLException- Specified by:
setTimestampin interfacePreparedStatement- Throws:
SQLException
-
setTimestamp
public void setTimestamp(int arg0, Timestamp arg1, Calendar arg2) throws SQLException- Specified by:
setTimestampin interfacePreparedStatement- Throws:
SQLException
-
setURL
public void setURL(int arg0, URL arg1) throws SQLException- Specified by:
setURLin interfacePreparedStatement- Throws:
SQLException
-
setUnicodeStream
public void setUnicodeStream(int arg0, InputStream arg1, int arg2) throws SQLException- Specified by:
setUnicodeStreamin interfacePreparedStatement- Throws:
SQLException
-
addBatch
public void addBatch() throws SQLException- Specified by:
addBatchin interfacePreparedStatement- Throws:
SQLException
-
setAsciiStream
public void setAsciiStream(int arg0, InputStream arg1) throws SQLException- Specified by:
setAsciiStreamin interfacePreparedStatement- Throws:
SQLException
-
setAsciiStream
public void setAsciiStream(int arg0, InputStream arg1, long arg2) throws SQLException- Specified by:
setAsciiStreamin interfacePreparedStatement- Throws:
SQLException
-
setBinaryStream
public void setBinaryStream(int arg0, InputStream arg1) throws SQLException- Specified by:
setBinaryStreamin interfacePreparedStatement- Throws:
SQLException
-
setBinaryStream
public void setBinaryStream(int arg0, InputStream arg1, long arg2) throws SQLException- Specified by:
setBinaryStreamin interfacePreparedStatement- Throws:
SQLException
-
setBlob
public void setBlob(int arg0, InputStream arg1) throws SQLException- Specified by:
setBlobin interfacePreparedStatement- Throws:
SQLException
-
setBlob
public void setBlob(int arg0, InputStream arg1, long arg2) throws SQLException- Specified by:
setBlobin interfacePreparedStatement- Throws:
SQLException
-
setCharacterStream
public void setCharacterStream(int arg0, Reader arg1) throws SQLException- Specified by:
setCharacterStreamin interfacePreparedStatement- Throws:
SQLException
-
setCharacterStream
public void setCharacterStream(int arg0, Reader arg1, long arg2) throws SQLException- Specified by:
setCharacterStreamin interfacePreparedStatement- Throws:
SQLException
-
setClob
public void setClob(int arg0, Reader arg1) throws SQLException- Specified by:
setClobin interfacePreparedStatement- Throws:
SQLException
-
setClob
public void setClob(int arg0, Reader arg1, long arg2) throws SQLException- Specified by:
setClobin interfacePreparedStatement- Throws:
SQLException
-
setNCharacterStream
public void setNCharacterStream(int arg0, Reader arg1) throws SQLException- Specified by:
setNCharacterStreamin interfacePreparedStatement- Throws:
SQLException
-
setNCharacterStream
public void setNCharacterStream(int arg0, Reader arg1, long arg2) throws SQLException- Specified by:
setNCharacterStreamin interfacePreparedStatement- Throws:
SQLException
-
setNClob
public void setNClob(int arg0, NClob arg1) throws SQLException- Specified by:
setNClobin interfacePreparedStatement- Throws:
SQLException
-
setNClob
public void setNClob(int arg0, Reader arg1) throws SQLException- Specified by:
setNClobin interfacePreparedStatement- Throws:
SQLException
-
setNClob
public void setNClob(int arg0, Reader arg1, long arg2) throws SQLException- Specified by:
setNClobin interfacePreparedStatement- Throws:
SQLException
-
setNString
public void setNString(int arg0, String arg1) throws SQLException- Specified by:
setNStringin interfacePreparedStatement- Throws:
SQLException
-
setRowId
public void setRowId(int arg0, RowId arg1) throws SQLException- Specified by:
setRowIdin interfacePreparedStatement- Throws:
SQLException
-
setSQLXML
public void setSQLXML(int arg0, SQLXML arg1) throws SQLException- Specified by:
setSQLXMLin interfacePreparedStatement- Throws:
SQLException
-
isCloseOnCompletion
public boolean isCloseOnCompletion() throws SQLException- Specified by:
isCloseOnCompletionin interfaceStatement- Overrides:
isCloseOnCompletionin classDistributedTemplate<PreparedStatement>- Throws:
SQLException
-
closeOnCompletion
public void closeOnCompletion() throws SQLException- Specified by:
closeOnCompletionin interfaceStatement- Overrides:
closeOnCompletionin classDistributedTemplate<PreparedStatement>- Throws:
SQLException
-
-