|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<HeterogeneousBatchKind>
com.ibm.pdq.runtime.HeterogeneousBatchKind
public enum HeterogeneousBatchKind
Indicates for an instance of Data
that SQL statements are being executed
immediately, or that a batch for a heterogeneous update with parameters is being created.
pureQuery supports three types of batching of SQL statements: homogeneous batches, heterogenous batches without parameters, and heterogeneous updates with parameters. See the IBM Optim
pureQuery Runtime documentation for a full description of the different types of batching in pureQuery. HeterogeneousBatchKind
is used for heterogeneous updates with parameters.
pureQuery performs heterogeneous updates with parameters by queueing INSERT, UPDATE, and DELETE SQL statements in memory for a particular instance of Data
, and then executing the
queued statements in one network trip. The implementation classes that the pureQuery Generator creates for user-supplied interfaces of annotated methods implement the user-provided interfaces, as
well as the Data
interface. See the IBM Optim pureQuery Runtime documentation for an explaination of how to perform heterogeneous batches with parameters when using the
annotated-method programming style.
Calling data.startBatch
(HeterogeneousBatchKind.heterogeneousModify__)
starts a batch for a heterogeneous update with parameters for the instance of Data
. INSERT, UPDATE, and DELETE SQL statement
are then queued in the batch by calling pureQuery annotated and inline methods in the instance of Data
. If an attempt is made to add SQL statements other than INSERT, UPDATE, and
DELETE to the batch (by calling methods that excute SQL statements that are not INSERT, UPDATE, or DELETE), an exception is thrown, the current batch is cleared, and none of the SQL statements
are executed. When all of the necessary SQL statements have been added to the batch, the batch can be executed by calling data.endBatch()
.
Calling data.startBatch(HeterogeneousBatchKind.heterogeneousModify__)
starts a batch for data
. Calling data.getBatchKind()
returns either heterogeneousNone__
, to indicate that no heterogeneous batch with parameters is being created
and that SQL statements are being executed immediately, or it returns heterogeneousModify__
, to indicate that SQL statements executed in pureQuery inline and
annotated methods are being queued in a heterogeneous batch with parameters.
Enum Constant and Description | |
---|---|
heterogeneousMixed__ For future enhancement. |
|
heterogeneousModify__ Indicates the state of an instance of Data in which INSERT, UPDATE,
and DELETE SQL statements are queued to be to be executed as a heterogeneous update with parameters. |
|
heterogeneousNone__ Indicates the state of an instance of Data in which SQL statements
are executed immediately (that is, no SQL statements are being queued to be executed as a heterogeneous update with parameters). |
|
heterogeneousQuery__ For future enhancement. |
Return Data Type | Method Name and Description |
---|---|
static HeterogeneousBatchKind |
valueOf(String name) Returns the enum constant of this type with the specified name. |
static HeterogeneousBatchKind[] |
values() Returns an array containing the constants of this enum type, in the order they're declared. |
Methods inherited from class java.lang.Enum |
---|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final HeterogeneousBatchKind heterogeneousMixed__
public static final HeterogeneousBatchKind heterogeneousModify__
Data
in which INSERT, UPDATE, and
DELETE SQL statements are queued to be to be executed as a heterogeneous update with parameters.
This state is entered for an instance of Data
when a batch for the update is created by calling data.startBatch(HeterogeneousBatchKind.heterogeneousModify__)
. This
state is exited when the batch is executed by calling data.endBatch()
.
Data.getBatchKind()
public static final HeterogeneousBatchKind heterogeneousNone__
Data
in which SQL statements are
executed immediately (that is, no SQL statements are being queued to be executed as a heterogeneous update with parameters).
This state is the default state for an instance of Data
. Calling data.startBatch(HeterogeneousBatchKind.heterogeneousModify__)
for the
instance causes a switch to the heterogeneousModify__
state by starting a
batch for a heterogeneous update with parameters. Executing the batch by calling data.endBatch()
returns
the instance to the heterogeneousNone__
state.
Data.getBatchKind()
public static final HeterogeneousBatchKind heterogeneousQuery__
Method Detail |
---|
public static HeterogeneousBatchKind valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if
this enum type has no constant with the specified namepublic static final HeterogeneousBatchKind[] values()
for(HeterogeneousBatchKind c : HeterogeneousBatchKind.values()) System.out.println(c);
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |