|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<BatchFetchStyle>
org.hibernate.loader.BatchFetchStyle
public enum BatchFetchStyle
Defines the style that should be used to perform batch loading. Which style to use is declared using
the ""hibernate.batch_fetch_style""
(AvailableSettings.BATCH_FETCH_STYLE
) setting
Enum Constant Summary | |
---|---|
DYNAMIC
Dynamically builds its SQL based on the actual number of available ids. |
|
LEGACY
The legacy algorithm where we keep a set of pre-built batch sizes based on ArrayHelper.getBatchSizes(int) . |
|
PADDED
Still keeps the concept of pre-built batch sizes, but uses the next-bigger batch size and pads the extra identifier placeholders. |
Method Summary | |
---|---|
static BatchFetchStyle |
byName(String name)
|
static BatchFetchStyle |
interpret(Object setting)
|
static BatchFetchStyle |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static BatchFetchStyle[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, 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 BatchFetchStyle LEGACY
ArrayHelper.getBatchSizes(int)
. Batches are performed
using the next-smaller pre-built batch size from the number of existing batchable identifiers.
For example, with a batch-size setting of 32 the pre-built batch sizes would be [32, 16, 10, 9, 8, 7, .., 1].
An attempt to batch load 31 identifiers would result in batches of 16, 10, and 5.
public static final BatchFetchStyle PADDED
public static final BatchFetchStyle DYNAMIC
Method Detail |
---|
public static BatchFetchStyle[] values()
for (BatchFetchStyle c : BatchFetchStyle.values()) System.out.println(c);
public static BatchFetchStyle valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic static BatchFetchStyle byName(String name)
public static BatchFetchStyle interpret(Object setting)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |