Author: ppoddar
Date: Thu May 9 15:30:05 2013
New Revision: 1480690
URL: http://svn.apache.org/r1480690
Log:
document the Stored Procedure query support
Modified:
openjpa/sandboxes/21/openjpa-lib/src/main/java/org/apache/openjpa/lib/rop/BatchedResultObjectProvider.java
Modified:
openjpa/sandboxes/21/openjpa-lib/src/main/java/org/apache/openjpa/lib/rop/BatchedResultObjectProvider.java
URL:
http://svn.apache.org/viewvc/openjpa/sandboxes/21/openjpa-lib/src/main/java/org/apache/openjpa/lib/rop/BatchedResultObjectProvider.java?rev=1480690&r1=1480689&r2=1480690&view=diff
==============================================================================
---
openjpa/sandboxes/21/openjpa-lib/src/main/java/org/apache/openjpa/lib/rop/BatchedResultObjectProvider.java
(original)
+++
openjpa/sandboxes/21/openjpa-lib/src/main/java/org/apache/openjpa/lib/rop/BatchedResultObjectProvider.java
Thu May 9 15:30:05 2013
@@ -18,10 +18,45 @@
*/
package org.apache.openjpa.lib.rop;
+
+/**
+ * A provider for multiple result sets.
+ * This provider acts as a container of other result providers. The underlying
providers
+ * contain the actual data and are {@link
java.sql.ResultObjectProvider#getResultObject() iterated}
+ * for the results, while this provider iterates over its underlying providers.
+ * <br>
+ * Designed for the specific purpose of getting results from the execution of
Stored Procedures
+ * that can produce more than one result set and an optional update count. Few
methods related
+ * to iterating multiple results and update count mirror the methods in JDBC
{@link java.sql.Statement}.
+ * <br>
+ *
+ * @see org.apache.openjpa.kernel.QueryResultCallback.QueryResultCallback
+ *
+ * @author Pinaki Poddar
+ *
+ */
public interface BatchedResultObjectProvider extends ResultObjectProvider {
+ /**
+ * Gets the next result object provider from its batch.
+ */
public ResultObjectProvider getResultObject() throws Exception;
+
+ /**
+ * Affirms if this batch contains more results.
+ */
public boolean hasMoreResults();
+
+ /**
+ * Gets the result of executing the underlying JDBC statement.
+ * @return a boolean value whose semantics is same as {@link
java.sql.PreparedStatement#execute()}.
+ */
public boolean getExecutionResult();
+
+
+ /**
+ * Gets the count of records updated by the underlying JDBC statement.
+ * @return an integer value whose semantics is same as {@link
java.sql.CallableStatement#getUpdateCount()}.
+ */
public int getUpdateCount();
}