|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.jdo.drivers.MultiRSCallQuery
PersistenceQuery implementation for CallableStatements that yield multiple ResultSets, like Sybase stored procedures.
Constructor Summary | |
(package private) |
MultiRSCallQuery(java.lang.String call,
java.lang.Class[] types,
java.lang.Class javaClass,
java.lang.String[] fields,
int[] sqlTypes)
|
Method Summary | |
void |
close()
Close the query and release all resources held by the query. |
void |
execute(java.lang.Object conn,
AccessMode accessMode)
Execute the query with the give connection and lock type. |
java.lang.Object |
fetch(java.lang.Object[] fields,
java.lang.Object identity)
Loades the object. |
int |
getParameterCount()
Returns the number of parameters required for this query. |
java.lang.Class |
getParameterType(int index)
Returns the type of a parameter required by this query. |
java.lang.Class |
getResultType()
Returns the type of object returned by this query. |
java.lang.Object |
nextIdentity(java.lang.Object identity)
Returns the identity of the next object to be returned. |
void |
setParameter(int index,
java.lang.Object value)
Sets the value of a paramter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
MultiRSCallQuery(java.lang.String call, java.lang.Class[] types, java.lang.Class javaClass, java.lang.String[] fields, int[] sqlTypes)
Method Detail |
public int getParameterCount()
PersistenceQuery
getParameterCount
in interface PersistenceQuery
public java.lang.Class getParameterType(int index) throws java.lang.ArrayIndexOutOfBoundsException
PersistenceQuery
getParameterType
in interface PersistenceQuery
index
- The parameter index
java.lang.ArrayIndexOutOfBoundsException
public void setParameter(int index, java.lang.Object value) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException
PersistenceQuery
setParameter
in interface PersistenceQuery
index
- The parameter indexvalue
- The parameter value
java.lang.ArrayIndexOutOfBoundsException
java.lang.IllegalArgumentException
public java.lang.Class getResultType()
PersistenceQuery
getResultType
in interface PersistenceQuery
public void execute(java.lang.Object conn, AccessMode accessMode) throws QueryException, PersistenceException
PersistenceQuery
PersistenceQuery.nextIdentity(java.lang.Object)
and PersistenceQuery.fetch(java.lang.Object[], java.lang.Object)
. The
query parameters will be reset. A new query may be issued by
providing new query parameters and calling PersistenceQuery.execute(java.lang.Object, org.exolab.castor.mapping.AccessMode)
.
execute
in interface PersistenceQuery
conn
- An open connectionaccessMode
- The access mode (null equals shared)
QueryException
- An invalid query
PersistenceException
- An error reported by the
persistence enginepublic java.lang.Object nextIdentity(java.lang.Object identity) throws PersistenceException
PersistenceQuery
nextIdentity
in interface PersistenceQuery
identity
- The identity of the previous object,
null if this method is called for the first time
PersistenceException
- An error reported by the
persistence enginepublic void close()
PersistenceQuery
close
in interface PersistenceQuery
public java.lang.Object fetch(java.lang.Object[] fields, java.lang.Object identity) throws ObjectNotFoundException, PersistenceException
PersistenceQuery
PersistenceQuery.nextIdentity(java.lang.Object)
with the same identity.
If the object is locked by another transaction this method will
block until the lock is released, or a timeout occured. If a
timeout occurs or the object has been deleted by the other
transaction, this method will report an ObjectNotFoundException
. The query may proceed to the next
identity.
This method is equivalent to Persistence.load(java.lang.Object, java.lang.Object[], java.lang.Object, org.exolab.castor.mapping.AccessMode)
with a
known cache engine and access mode and acts on the query
results rather than issuing a new query to load the object.
fetch
in interface PersistenceQuery
fields
- The fields to load intoidentity
- The object's identity
PersistenceException
- A persistence error occured
ObjectNotFoundException
- The object was not found in
persistent storagePersistence.load(java.lang.Object, java.lang.Object[], java.lang.Object, org.exolab.castor.mapping.AccessMode)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |