Package org.apache.openjpa.slice.jdbc
Class DistributedPreparedStatement
- java.lang.Object
 - 
- org.apache.openjpa.slice.jdbc.DistributedTemplate<java.sql.PreparedStatement>
 - 
- org.apache.openjpa.slice.jdbc.DistributedPreparedStatement
 
 
 
- 
- All Implemented Interfaces:
 java.lang.AutoCloseable,java.lang.Iterable<java.sql.PreparedStatement>,java.sql.PreparedStatement,java.sql.Statement,java.sql.Wrapper
public class DistributedPreparedStatement extends DistributedTemplate<java.sql.PreparedStatement> implements java.sql.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 
 - 
 
- 
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()java.sql.ResultSetexecuteQuery()intexecuteUpdate()java.sql.ResultSetMetaDatagetMetaData()java.sql.ParameterMetaDatagetParameterMetaData()booleanisCloseOnCompletion()voidsetArray(int i, java.sql.Array x)voidsetAsciiStream(int arg0, java.io.InputStream arg1)voidsetAsciiStream(int arg0, java.io.InputStream arg1, int arg2)voidsetAsciiStream(int arg0, java.io.InputStream arg1, long arg2)voidsetBigDecimal(int arg0, java.math.BigDecimal arg1)voidsetBinaryStream(int arg0, java.io.InputStream arg1)voidsetBinaryStream(int arg0, java.io.InputStream arg1, int arg2)voidsetBinaryStream(int arg0, java.io.InputStream arg1, long arg2)voidsetBlob(int arg0, java.io.InputStream arg1)voidsetBlob(int arg0, java.io.InputStream arg1, long arg2)voidsetBlob(int arg0, java.sql.Blob arg1)voidsetBoolean(int arg0, boolean arg1)voidsetByte(int arg0, byte arg1)voidsetBytes(int arg0, byte[] arg1)voidsetCharacterStream(int arg0, java.io.Reader arg1)voidsetCharacterStream(int arg0, java.io.Reader arg1, int arg2)voidsetCharacterStream(int arg0, java.io.Reader arg1, long arg2)voidsetClob(int arg0, java.io.Reader arg1)voidsetClob(int arg0, java.io.Reader arg1, long arg2)voidsetClob(int arg0, java.sql.Clob arg1)voidsetDate(int arg0, java.sql.Date arg1)voidsetDate(int arg0, java.sql.Date arg1, java.util.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, java.io.Reader arg1)voidsetNCharacterStream(int arg0, java.io.Reader arg1, long arg2)voidsetNClob(int arg0, java.io.Reader arg1)voidsetNClob(int arg0, java.io.Reader arg1, long arg2)voidsetNClob(int arg0, java.sql.NClob arg1)voidsetNString(int arg0, java.lang.String arg1)voidsetNull(int arg0, int arg1)voidsetNull(int arg0, int arg1, java.lang.String arg2)voidsetObject(int arg0, java.lang.Object arg1)voidsetObject(int arg0, java.lang.Object arg1, int arg2)voidsetObject(int arg0, java.lang.Object arg1, int arg2, int arg3)voidsetRef(int arg0, java.sql.Ref arg1)voidsetRowId(int arg0, java.sql.RowId arg1)voidsetShort(int arg0, short arg1)voidsetSQLXML(int arg0, java.sql.SQLXML arg1)voidsetString(int arg0, java.lang.String arg1)voidsetTime(int arg0, java.sql.Time arg1)voidsetTime(int arg0, java.sql.Time arg1, java.util.Calendar arg2)voidsetTimestamp(int arg0, java.sql.Timestamp arg1)voidsetTimestamp(int arg0, java.sql.Timestamp arg1, java.util.Calendar arg2)voidsetUnicodeStream(int arg0, java.io.InputStream arg1, int arg2)voidsetURL(int arg0, java.net.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.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 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
DistributedPreparedStatement
public DistributedPreparedStatement(DistributedConnection c)
 
 - 
 
- 
Method Detail
- 
clearParameters
public void clearParameters() throws java.sql.SQLException- Specified by:
 clearParametersin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
execute
public boolean execute() throws java.sql.SQLException- Specified by:
 executein interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
executeQuery
public java.sql.ResultSet executeQuery() throws java.sql.SQLException- Specified by:
 executeQueryin interfacejava.sql.PreparedStatement- Overrides:
 executeQueryin classDistributedTemplate<java.sql.PreparedStatement>- Throws:
 java.sql.SQLException
 
- 
executeUpdate
public int executeUpdate() throws java.sql.SQLException- Specified by:
 executeUpdatein interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
getMetaData
public java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException- Specified by:
 getMetaDatain interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
getParameterMetaData
public java.sql.ParameterMetaData getParameterMetaData() throws java.sql.SQLException- Specified by:
 getParameterMetaDatain interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setArray
public void setArray(int i, java.sql.Array x) throws java.sql.SQLException- Specified by:
 setArrayin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setAsciiStream
public void setAsciiStream(int arg0, java.io.InputStream arg1, int arg2) throws java.sql.SQLException- Specified by:
 setAsciiStreamin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setBigDecimal
public void setBigDecimal(int arg0, java.math.BigDecimal arg1) throws java.sql.SQLException- Specified by:
 setBigDecimalin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setBinaryStream
public void setBinaryStream(int arg0, java.io.InputStream arg1, int arg2) throws java.sql.SQLException- Specified by:
 setBinaryStreamin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setBlob
public void setBlob(int arg0, java.sql.Blob arg1) throws java.sql.SQLException- Specified by:
 setBlobin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setBoolean
public void setBoolean(int arg0, boolean arg1) throws java.sql.SQLException- Specified by:
 setBooleanin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setByte
public void setByte(int arg0, byte arg1) throws java.sql.SQLException- Specified by:
 setBytein interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setBytes
public void setBytes(int arg0, byte[] arg1) throws java.sql.SQLException- Specified by:
 setBytesin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setCharacterStream
public void setCharacterStream(int arg0, java.io.Reader arg1, int arg2) throws java.sql.SQLException- Specified by:
 setCharacterStreamin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setClob
public void setClob(int arg0, java.sql.Clob arg1) throws java.sql.SQLException- Specified by:
 setClobin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setDate
public void setDate(int arg0, java.sql.Date arg1) throws java.sql.SQLException- Specified by:
 setDatein interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setDate
public void setDate(int arg0, java.sql.Date arg1, java.util.Calendar arg2) throws java.sql.SQLException- Specified by:
 setDatein interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setDouble
public void setDouble(int arg0, double arg1) throws java.sql.SQLException- Specified by:
 setDoublein interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setFloat
public void setFloat(int arg0, float arg1) throws java.sql.SQLException- Specified by:
 setFloatin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setInt
public void setInt(int arg0, int arg1) throws java.sql.SQLException- Specified by:
 setIntin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setLong
public void setLong(int arg0, long arg1) throws java.sql.SQLException- Specified by:
 setLongin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setNull
public void setNull(int arg0, int arg1) throws java.sql.SQLException- Specified by:
 setNullin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setNull
public void setNull(int arg0, int arg1, java.lang.String arg2) throws java.sql.SQLException- Specified by:
 setNullin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setObject
public void setObject(int arg0, java.lang.Object arg1) throws java.sql.SQLException- Specified by:
 setObjectin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setObject
public void setObject(int arg0, java.lang.Object arg1, int arg2) throws java.sql.SQLException- Specified by:
 setObjectin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setObject
public void setObject(int arg0, java.lang.Object arg1, int arg2, int arg3) throws java.sql.SQLException- Specified by:
 setObjectin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setRef
public void setRef(int arg0, java.sql.Ref arg1) throws java.sql.SQLException- Specified by:
 setRefin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setShort
public void setShort(int arg0, short arg1) throws java.sql.SQLException- Specified by:
 setShortin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setString
public void setString(int arg0, java.lang.String arg1) throws java.sql.SQLException- Specified by:
 setStringin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setTime
public void setTime(int arg0, java.sql.Time arg1) throws java.sql.SQLException- Specified by:
 setTimein interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setTime
public void setTime(int arg0, java.sql.Time arg1, java.util.Calendar arg2) throws java.sql.SQLException- Specified by:
 setTimein interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setTimestamp
public void setTimestamp(int arg0, java.sql.Timestamp arg1) throws java.sql.SQLException- Specified by:
 setTimestampin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setTimestamp
public void setTimestamp(int arg0, java.sql.Timestamp arg1, java.util.Calendar arg2) throws java.sql.SQLException- Specified by:
 setTimestampin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setURL
public void setURL(int arg0, java.net.URL arg1) throws java.sql.SQLException- Specified by:
 setURLin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setUnicodeStream
public void setUnicodeStream(int arg0, java.io.InputStream arg1, int arg2) throws java.sql.SQLException- Specified by:
 setUnicodeStreamin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
addBatch
public void addBatch() throws java.sql.SQLException- Specified by:
 addBatchin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setAsciiStream
public void setAsciiStream(int arg0, java.io.InputStream arg1) throws java.sql.SQLException- Specified by:
 setAsciiStreamin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setAsciiStream
public void setAsciiStream(int arg0, java.io.InputStream arg1, long arg2) throws java.sql.SQLException- Specified by:
 setAsciiStreamin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setBinaryStream
public void setBinaryStream(int arg0, java.io.InputStream arg1) throws java.sql.SQLException- Specified by:
 setBinaryStreamin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setBinaryStream
public void setBinaryStream(int arg0, java.io.InputStream arg1, long arg2) throws java.sql.SQLException- Specified by:
 setBinaryStreamin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setBlob
public void setBlob(int arg0, java.io.InputStream arg1) throws java.sql.SQLException- Specified by:
 setBlobin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setBlob
public void setBlob(int arg0, java.io.InputStream arg1, long arg2) throws java.sql.SQLException- Specified by:
 setBlobin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setCharacterStream
public void setCharacterStream(int arg0, java.io.Reader arg1) throws java.sql.SQLException- Specified by:
 setCharacterStreamin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setCharacterStream
public void setCharacterStream(int arg0, java.io.Reader arg1, long arg2) throws java.sql.SQLException- Specified by:
 setCharacterStreamin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setClob
public void setClob(int arg0, java.io.Reader arg1) throws java.sql.SQLException- Specified by:
 setClobin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setClob
public void setClob(int arg0, java.io.Reader arg1, long arg2) throws java.sql.SQLException- Specified by:
 setClobin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setNCharacterStream
public void setNCharacterStream(int arg0, java.io.Reader arg1) throws java.sql.SQLException- Specified by:
 setNCharacterStreamin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setNCharacterStream
public void setNCharacterStream(int arg0, java.io.Reader arg1, long arg2) throws java.sql.SQLException- Specified by:
 setNCharacterStreamin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setNClob
public void setNClob(int arg0, java.sql.NClob arg1) throws java.sql.SQLException- Specified by:
 setNClobin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setNClob
public void setNClob(int arg0, java.io.Reader arg1) throws java.sql.SQLException- Specified by:
 setNClobin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setNClob
public void setNClob(int arg0, java.io.Reader arg1, long arg2) throws java.sql.SQLException- Specified by:
 setNClobin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setNString
public void setNString(int arg0, java.lang.String arg1) throws java.sql.SQLException- Specified by:
 setNStringin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setRowId
public void setRowId(int arg0, java.sql.RowId arg1) throws java.sql.SQLException- Specified by:
 setRowIdin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
setSQLXML
public void setSQLXML(int arg0, java.sql.SQLXML arg1) throws java.sql.SQLException- Specified by:
 setSQLXMLin interfacejava.sql.PreparedStatement- Throws:
 java.sql.SQLException
 
- 
isCloseOnCompletion
public boolean isCloseOnCompletion() throws java.sql.SQLException- Specified by:
 isCloseOnCompletionin interfacejava.sql.Statement- Overrides:
 isCloseOnCompletionin classDistributedTemplate<java.sql.PreparedStatement>- Throws:
 java.sql.SQLException
 
- 
closeOnCompletion
public void closeOnCompletion() throws java.sql.SQLException- Specified by:
 closeOnCompletionin interfacejava.sql.Statement- Overrides:
 closeOnCompletionin classDistributedTemplate<java.sql.PreparedStatement>- Throws:
 java.sql.SQLException
 
 - 
 
 -