枚举 BatchFetchStyle
- java.lang.Object
-
- java.lang.Enum<BatchFetchStyle>
-
- org.hibernate.loader.BatchFetchStyle
-
- 所有已实现的接口:
Serializable,Comparable<BatchFetchStyle>
public enum BatchFetchStyle extends 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- 作者:
- Steve Ebersole
-
-
枚举常量概要
枚举常量 枚举常量 说明 DYNAMICDynamically builds its SQL based on the actual number of available ids.LEGACYThe legacy algorithm where we keep a set of pre-built batch sizes based onArrayHelper.getBatchSizes(int).PADDEDStill keeps the concept of pre-built batch sizes, but uses the next-bigger batch size and pads the extra identifier placeholders.
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static BatchFetchStylebyName(String name)static BatchFetchStyleinterpret(Object setting)static BatchFetchStylevalueOf(String name)返回带有指定名称的该类型的枚举常量。static BatchFetchStyle[]values()按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。
-
-
-
枚举常量详细资料
-
LEGACY
public static final BatchFetchStyle LEGACY
The legacy algorithm where we keep a set of pre-built batch sizes based onArrayHelper.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.
-
PADDED
public static final BatchFetchStyle PADDED
Still keeps the concept of pre-built batch sizes, but uses the next-bigger batch size and pads the extra identifier placeholders. Using the same example of a batch-size setting of 32 the pre-built batch sizes would be the same. However, the attempt to batch load 31 identifiers would result just a single batch of size 32. The identifiers to load would be "padded" (aka, repeated) to make up the difference.
-
DYNAMIC
public static final BatchFetchStyle DYNAMIC
Dynamically builds its SQL based on the actual number of available ids. Does still limit to the batch-size defined on the entity/collection
-
-
方法详细资料
-
values
public static BatchFetchStyle[] values()
按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。该方法可用于迭代 常量, 如下所示:for (BatchFetchStyle c : BatchFetchStyle.values()) System.out.println(c);
- 返回:
- 按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
-
valueOf
public static BatchFetchStyle valueOf(String name)
返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)- 参数:
name- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException- 如果该枚举类型没有带有指定名称的常量NullPointerException- 如果参数为空值
-
byName
public static BatchFetchStyle byName(String name)
-
interpret
public static BatchFetchStyle interpret(Object setting)
-
-