Module org.eclipse.persistence.dbws
Class BatchQueryOperation
java.lang.Object
org.eclipse.persistence.internal.xr.Operation
org.eclipse.persistence.internal.xr.QueryOperation
org.eclipse.persistence.internal.xr.BatchQueryOperation
For use with a batch SQL query, i.e. two or more SQL statements that
are to be executed against the database in order. The result will
be either 0 (success) or 1 (failure). Note that if a statement
fails, i.e. an exception is thrown upon executing a given SQL
statement, none of the remaining statements are executed.
Warning: the SQL is assumed to be valid and well formed, and no
roll back or any type of error handling is performed.
-
Field Summary
Fields inherited from class org.eclipse.persistence.internal.xr.QueryOperation
ATTACHMENT_STR, BASE64_BINARY_STR, CURSOR_OF_STR, DATABASEQUERY_STR, DATAHANDLER_STR, GETSTRING_METHOD, ITEMS_STR, ORACLEOPAQUE_STR, queryHandler, result, RESULT_STR, RESULTS_STR, SIMPLEXML_FORMAT_STR, SIMPLEXML_STR, userDefined, VALUE_STR, VALUEOBJECT_STR, XMLTYPEFACTORY_STR, XSD_STR, XSI_STR, XSITYPE_STR
Fields inherited from class org.eclipse.persistence.internal.xr.Operation
name, parameters
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn the List of SQL statements to be executed for this operation.void
initialize
(XRServiceAdapter xrService) The initialize method will add an XMLDesctriptor for org.eclipse.persistence.internal.xr.ValueObject to the OX project.invoke
(XRServiceAdapter xrService, Invocation invocation) Invoke the SQL statements in order against the database.void
setBatchSql
(List<String> batchSql) Set the List of SQL statements to be executed for this operation.void
validate
(XRServiceAdapter xrService) No validation can be done for a batch query operation.Methods inherited from class org.eclipse.persistence.internal.xr.QueryOperation
addSimpleXMLFormatModelDescriptor, addValueObjectDescriptor, createSimpleXMLFormat, getQueryHandler, getResult, getResultType, hasResponse, isAttachment, isCollection, isSimpleXMLFormat, isUserDefined, populateTargetObjectFromRecord, setQueryHandler, setResult, setUserDefined
Methods inherited from class org.eclipse.persistence.internal.xr.Operation
getName, getParameters, setName
-
Field Details
-
batchSql
-
-
Constructor Details
-
BatchQueryOperation
public BatchQueryOperation()
-
-
Method Details
-
getBatchSql
Return the List of SQL statements to be executed for this operation. -
setBatchSql
Set the List of SQL statements to be executed for this operation. -
invoke
Invoke the SQL statements in order against the database. The returned ValueOject will hold either 0 (success) or 1 (failure).- Overrides:
invoke
in classQueryOperation
- Parameters:
xrService
- parentXRService
that owns thisOperation
invocation
- contains runtime argument values to be bound to the list ofParameter
's.- Returns:
- result - the result of the underlying
SELECT
operation on the database, ornull
. - See Also:
-
validate
No validation can be done for a batch query operation.- Overrides:
validate
in classQueryOperation
-
initialize
The initialize method will add an XMLDesctriptor for org.eclipse.persistence.internal.xr.ValueObject to the OX project. This class is used to hold the result of the batch SQL execution.- Overrides:
initialize
in classQueryOperation
-