Record Class FetchOptions
java.lang.Object
java.lang.Record
org.hibernate.engine.spi.FetchOptions
- All Implemented Interfaces:
Serializable
public record FetchOptions(@Nullable CacheStoreMode cacheStoreMode, @Nullable CacheRetrieveMode cacheRetrieveMode, @Nullable Integer batchSize, @Nullable FetchMethod fetchMethod)
extends Record
implements Serializable
Fetch options
applied to a particular association fetch.
- Since:
- 6.0
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFetchOptions(CacheStoreMode cacheStoreMode, CacheRetrieveMode cacheRetrieveMode, Integer batchSize, FetchMethod fetchMethod) Creates an instance of aFetchOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebatchSizerecord component.Returns the value of thecacheRetrieveModerecord component.Returns the value of thecacheStoreModerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefetchMethodrecord component.booleanbooleanfinal inthashCode()Returns a hash code value for this object.booleanstatic FetchOptionsof(AttributeNode<?> node) static FetchOptionsof(CacheStoreMode cacheStoreMode, CacheRetrieveMode cacheRetrieveMode, Integer batchSize) static FetchOptionsof(CacheStoreMode cacheStoreMode, CacheRetrieveMode cacheRetrieveMode, Integer batchSize, FetchMethod fetchMethod) overrideCacheMode(CacheMode previousCacheMode) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
NONE
-
-
Constructor Details
-
FetchOptions
public FetchOptions(@Nullable CacheStoreMode cacheStoreMode, @Nullable CacheRetrieveMode cacheRetrieveMode, @Nullable Integer batchSize, @Nullable FetchMethod fetchMethod) Creates an instance of aFetchOptionsrecord class.- Parameters:
cacheStoreMode- the value for thecacheStoreModerecord componentcacheRetrieveMode- the value for thecacheRetrieveModerecord componentbatchSize- the value for thebatchSizerecord componentfetchMethod- the value for thefetchMethodrecord component
-
-
Method Details
-
of
public static FetchOptions of(@Nullable CacheStoreMode cacheStoreMode, @Nullable CacheRetrieveMode cacheRetrieveMode, @Nullable Integer batchSize) -
of
public static FetchOptions of(@Nullable CacheStoreMode cacheStoreMode, @Nullable CacheRetrieveMode cacheRetrieveMode, @Nullable Integer batchSize, @Nullable FetchMethod fetchMethod) -
of
-
hasOptions
public boolean hasOptions() -
hasCacheModes
public boolean hasCacheModes() -
hasBatchSize
public boolean hasBatchSize() -
overrideCacheMode
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
cacheStoreMode
Returns the value of thecacheStoreModerecord component.- Returns:
- the value of the
cacheStoreModerecord component
-
cacheRetrieveMode
Returns the value of thecacheRetrieveModerecord component.- Returns:
- the value of the
cacheRetrieveModerecord component
-
batchSize
-
fetchMethod
Returns the value of thefetchMethodrecord component.- Returns:
- the value of the
fetchMethodrecord component
-