public enum PersistBatch extends Enum<PersistBatch>
Used both at a per transaction basis and per request basis.
// set full jdbc batch as default
serverConfig.setPersistBatch(PersistBatch.ALL);
// set full jdbc batch per transaction
transaction.setBatch(PersistBatch.ALL);
Enum Constant and Description |
---|
ALL
Use JDBC Batch mode on Inserts, Updates and Deletes.
|
INHERIT
You should not use this value explicitly.
|
INSERT
Use JDBC Batch mode on Inserts.
|
NONE
Do not use JDBC Batch mode.
|
Modifier and Type | Method and Description |
---|---|
boolean |
forInsert()
Return true if persist cascade should use JDBC batch for inserts.
|
static PersistBatch |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PersistBatch[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PersistBatch NONE
public static final PersistBatch INSERT
public static final PersistBatch ALL
public static final PersistBatch INHERIT
public static PersistBatch[] values()
for (PersistBatch c : PersistBatch.values()) System.out.println(c);
public static PersistBatch valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean forInsert()
Copyright © 2018. All rights reserved.