© 2005 BEA Systems, Inc.

com.bea.p13n.content.document.jdbc
Class SearchStatement

java.lang.Object
  extended bycom.bea.p13n.content.document.jdbc.CallableStatement
      extended bycom.bea.p13n.content.document.jdbc.SearchStatement
All Implemented Interfaces:
CallableStatement, PreparedStatement, Statement
Direct Known Subclasses:
FindDocumentIdsStatement, FindDocumentMetadataStatement, FindDocumentsStatement

public abstract class SearchStatement
extends CallableStatement

A callable statement which handles turning Search parameters into DocumentIterators.

This expects InParam1 to be either a Search or a string query which can be converted to a Search. OutParam1 will be the DocumentIterator of the type the subclasses searches for.

This is abstract -- subclasses must implement the createIterator(com.bea.p13n.content.document.spi.DocumentProvider, com.bea.p13n.content.expression.Search) method.


Field Summary
protected  DocumentIterator iterator
          Deprecated. OutParam1: the DocumentIterator.
protected  Search searchParameters
          Deprecated. InParam1: the search parameters.
 
Fields inherited from class com.bea.p13n.content.document.jdbc.CallableStatement
connection
 
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
SearchStatement(Connection con)
          Deprecated. Constructor.
 
Method Summary
 void clearParameters()
          Deprecated. Clear the parameters.
 void close()
          Deprecated. Close the statement and any related resources.
protected  void closeIterator()
          Deprecated. Close the open document iterator.
protected abstract  DocumentIterator createIterator(DocumentProvider p, Search params)
          Deprecated. This method is invoked to generate the DocumentIterator for this object.
 boolean execute()
          Deprecated. Execute the statement.
 Object getObject(int index)
          Deprecated. Get the output parameter.
 void setObject(int index, Object obj)
          Deprecated. Set the input parameter.
 void setString(int index, String str)
          Deprecated. Set the input parameter string.
 
Methods inherited from class com.bea.p13n.content.document.jdbc.CallableStatement
addBatch, addBatch, cancel, clearBatch, clearWarnings, execute, execute, execute, execute, executeBatch, executeQuery, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getArray, getArray, getBigDecimal, getBigDecimal, getBigDecimal, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getClob, getClob, getConnection, getDate, getDate, getDate, getDate, getDocumentProvider, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getGeneratedKeys, getInt, getInt, getLong, getLong, getMaxFieldSize, getMaxRows, getMetaData, getMoreResults, getMoreResults, getObject, getObject, getObject, getParameterMetaData, getQueryTimeout, getRef, getRef, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getShort, getShort, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getUpdateCount, getURL, getURL, getWarnings, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, setArray, setAsciiStream, setAsciiStream, setBigDecimal, setBigDecimal, setBinaryStream, setBinaryStream, setBlob, setBoolean, setBoolean, setByte, setByte, setBytes, setBytes, setCharacterStream, setCharacterStream, setClob, setCursorName, setDate, setDate, setDate, setDate, setDouble, setDouble, setEscapeProcessing, setFetchDirection, setFetchSize, setFloat, setFloat, setInt, setInt, setLong, setLong, setMaxFieldSize, setMaxRows, setNull, setNull, setNull, setNull, setObject, setObject, setObject, setObject, setObject, setQueryTimeout, setRef, setShort, setShort, setString, setTime, setTime, setTime, setTime, setTimestamp, setTimestamp, setTimestamp, setTimestamp, setUnicodeStream, setURL, setURL, wasNull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iterator

protected DocumentIterator iterator
Deprecated. 
OutParam1: the DocumentIterator.


searchParameters

protected Search searchParameters
Deprecated. 
InParam1: the search parameters.

Constructor Detail

SearchStatement

public SearchStatement(Connection con)
Deprecated. 
Constructor.

Method Detail

clearParameters

public void clearParameters()
Deprecated. 
Clear the parameters.

Specified by:
clearParameters in interface PreparedStatement
Specified by:
clearParameters in class CallableStatement
See Also:
closeIterator()

close

public void close()
Deprecated. 
Close the statement and any related resources.

Specified by:
close in interface Statement
Specified by:
close in class CallableStatement
See Also:
closeIterator()

closeIterator

protected void closeIterator()
Deprecated. 
Close the open document iterator.


createIterator

protected abstract DocumentIterator createIterator(DocumentProvider p,
                                                   Search params)
                                            throws DocumentException
Deprecated. 
This method is invoked to generate the DocumentIterator for this object.

Parameters:
p - the DocumentProvider to use.
params - the Search parameters passed into the statement.
Returns:
the DocumentIterator for the resulting search.
Throws:
DocumentException - thrown on an error.

execute

public boolean execute()
                throws SQLException
Deprecated. 
Execute the statement.

Specified by:
execute in interface PreparedStatement
Specified by:
execute in class CallableStatement
Throws:
SQLException - thrown on an error.

getObject

public Object getObject(int index)
                 throws SQLException
Deprecated. 
Get the output parameter.

Specified by:
getObject in interface CallableStatement
Specified by:
getObject in class CallableStatement
Parameters:
index - the output parameter index.
Throws:
SQLException - thrown on an error.

setObject

public void setObject(int index,
                      Object obj)
               throws SQLException
Deprecated. 
Set the input parameter.

Specified by:
setObject in interface PreparedStatement
Specified by:
setObject in class CallableStatement
Throws:
SQLException - thrown on invalid arguments.

setString

public void setString(int index,
                      String str)
               throws SQLException
Deprecated. 
Set the input parameter string.

Specified by:
setString in interface PreparedStatement
Overrides:
setString in class CallableStatement
Throws:
SQLException - thrown on invalid arguments.

© 2005 BEA Systems, Inc.

Copyright © 2005 BEA Systems, Inc. All Rights Reserved