Top Description Fields Constructors Methods
org.hibernate.loader

public final Enum BatchFetchStyle

extends Enum<BatchFetchStyle>
Class Inheritance
Annotations
@Deprecated
since:6.0
Imports
java.util.Locale, org.hibernate.loader.ast.spi.MultiKeyLoadSizingStrategy, org.jboss.logging.Logger

Deprecated

since 6.0.

see MultiKeyLoadSizingStrategy instead

Defines a type of batch loading.
Author
Steve Ebersole
See Also
org.hibernate.cfg.AvailableSettings#BATCH_FETCH_STYLE

Field Summary

Modifier and TypeField and Description
public static final BatchFetchStyle
DYNAMIC

Dynamically builds its SQL based on the actual number of available ids.

public static final BatchFetchStyle
LEGACY

The legacy algorithm where we keep a set of pre-built batch sizes based on org.hibernate.internal.util.collections.ArrayHelper#getBatchSizes.

private static final Logger
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.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static BatchFetchStyle
byName(String name)

Deprecated as a consequence of BatchFetchStyle being deprecated.
public static BatchFetchStyle
interpret(Object setting)

Deprecated as a consequence of BatchFetchStyle being deprecated.
public static BatchFetchStyle
valueOf(String name)

Deprecated as a consequence of BatchFetchStyle being deprecated.
public static BatchFetchStyle[]
values()

Deprecated as a consequence of BatchFetchStyle being deprecated.
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DYNAMICback to summary
public static final BatchFetchStyle DYNAMIC

Deprecated

as a consequence of BatchFetchStyle being deprecated. See corresponding docs for further information.

Dynamically builds its SQL based on the actual number of available ids. Does still limit to the batch-size defined on the entity/collection

LEGACYback to summary
public static final BatchFetchStyle LEGACY

Deprecated

as a consequence of BatchFetchStyle being deprecated. See corresponding docs for further information.

The legacy algorithm where we keep a set of pre-built batch sizes based on org.hibernate.internal.util.collections.ArrayHelper#getBatchSizes. 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.

logback to summary
private static final Logger log
PADDEDback to summary
public static final BatchFetchStyle PADDED

Deprecated

as a consequence of BatchFetchStyle being deprecated. See corresponding docs for further information.

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.

Constructor Detail

BatchFetchStyleback to summary
private BatchFetchStyle()

Method Detail

byNameback to summary
public static BatchFetchStyle byName(String name)

Deprecated

as a consequence of BatchFetchStyle being deprecated. See corresponding docs for further information.

interpretback to summary
public static BatchFetchStyle interpret(Object setting)

Deprecated

as a consequence of BatchFetchStyle being deprecated. See corresponding docs for further information.

valueOfback to summary
public static BatchFetchStyle valueOf(String name)

Deprecated

as a consequence of BatchFetchStyle being deprecated. See corresponding docs for further information.

valuesback to summary
public static BatchFetchStyle[] values()

Deprecated

as a consequence of BatchFetchStyle being deprecated. See corresponding docs for further information.