Top Description Fields Constructors Methods
org.hibernate.collection.internal

public Class StandardArraySemantics<E>

extends Object
implements CollectionSemantics<E[], E>
Class Inheritance
All Implemented Interfaces
org.hibernate.collection.spi.CollectionSemantics
Imports
java.util.Arrays, .Iterator, java.util.function.Consumer, org.hibernate.collection.spi.CollectionInitializerProducer, .CollectionSemantics, .InitializerProducerBuilder, .PersistentArrayHolder, .PersistentCollection, org.hibernate.engine.spi.SharedSessionContractImplementor, org.hibernate.metamodel.CollectionClassification, org.hibernate.metamodel.mapping.PluralAttributeMapping, org.hibernate.persister.collection.CollectionPersister, org.hibernate.spi.NavigablePath, org.hibernate.sql.results.graph.Fetch, .DomainResultCreationState, .FetchParent

CollectionSemantics implementation for arrays
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
public static final StandardArraySemantics<?>
INSTANCE

Singleton access

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public CollectionInitializerProducer
createInitializerProducer(NavigablePath navigablePath, PluralAttributeMapping attributeMapping, FetchParent fetchParent, boolean selected, String resultVariable, Fetch indexFetch, Fetch elementFetch, DomainResultCreationState creationState)

Overrides default org.hibernate.collection.spi.CollectionSemantics.createInitializerProducer.

Create a producer for org.hibernate.sql.results.graph.collection.CollectionInitializer instances for the given collection semantics
public CollectionClassification
public Class<Object[]>
public Iterator<E>
getElementIterator(E[] rawCollection)

Implements org.hibernate.collection.spi.CollectionSemantics.getElementIterator.

Obtain an iterator over the collection elements
public E[]
instantiateRaw(int anticipatedSize, CollectionPersister collectionDescriptor)

Implements org.hibernate.collection.spi.CollectionSemantics.instantiateRaw.

Create a raw (unwrapped) version of the collection
public PersistentCollection<E>
public void
visitElements(E[] array, Consumer<? super E> action)

Implements org.hibernate.collection.spi.CollectionSemantics.visitElements.

Visit the elements of the collection
public PersistentCollection<E>
wrap(E[] rawCollection, CollectionPersister collectionDescriptor, SharedSessionContractImplementor session)

Implements org.hibernate.collection.spi.CollectionSemantics.wrap.

Wrap a raw collection in wrapper
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final StandardArraySemantics<?> INSTANCE

Singleton access

Constructor Detail

StandardArraySemanticsback to summary
private StandardArraySemantics()

Method Detail

createInitializerProducerback to summary
public CollectionInitializerProducer createInitializerProducer(NavigablePath navigablePath, PluralAttributeMapping attributeMapping, FetchParent fetchParent, boolean selected, String resultVariable, Fetch indexFetch, Fetch elementFetch, DomainResultCreationState creationState)

Overrides default org.hibernate.collection.spi.CollectionSemantics.createInitializerProducer.

Doc from org.hibernate.collection.spi.CollectionSemantics.createInitializerProducer.

Create a producer for org.hibernate.sql.results.graph.collection.CollectionInitializer instances for the given collection semantics

Annotations
@Override
getCollectionClassificationback to summary
public CollectionClassification getCollectionClassification()

Implements org.hibernate.collection.spi.CollectionSemantics.getCollectionClassification.

Doc from org.hibernate.collection.spi.CollectionSemantics.getCollectionClassification.

The classification handled by this semantic

Annotations
@Override
getCollectionJavaTypeback to summary
public Class<Object[]> getCollectionJavaType()

Implements org.hibernate.collection.spi.CollectionSemantics.getCollectionJavaType.

Doc from org.hibernate.collection.spi.CollectionSemantics.getCollectionJavaType.

The collection's Java type

Annotations
@Override
getElementIteratorback to summary
public Iterator<E> getElementIterator(E[] rawCollection)

Implements org.hibernate.collection.spi.CollectionSemantics.getElementIterator.

Doc from org.hibernate.collection.spi.CollectionSemantics.getElementIterator.

Obtain an iterator over the collection elements

Annotations
@Override
instantiateRawback to summary
public E[] instantiateRaw(int anticipatedSize, CollectionPersister collectionDescriptor)

Implements org.hibernate.collection.spi.CollectionSemantics.instantiateRaw.

Doc from org.hibernate.collection.spi.CollectionSemantics.instantiateRaw.

Create a raw (unwrapped) version of the collection

Annotations
@Override
instantiateWrapperback to summary
public PersistentCollection<E> instantiateWrapper(Object key, CollectionPersister collectionDescriptor, SharedSessionContractImplementor session)

Implements org.hibernate.collection.spi.CollectionSemantics.instantiateWrapper.

Doc from org.hibernate.collection.spi.CollectionSemantics.instantiateWrapper.

Create a wrapper for the collection

Annotations
@Override
visitElementsback to summary
public void visitElements(E[] array, Consumer<? super E> action)

Implements org.hibernate.collection.spi.CollectionSemantics.visitElements.

Doc from org.hibernate.collection.spi.CollectionSemantics.visitElements.

Visit the elements of the collection

Annotations
@Override
wrapback to summary
public PersistentCollection<E> wrap(E[] rawCollection, CollectionPersister collectionDescriptor, SharedSessionContractImplementor session)

Implements org.hibernate.collection.spi.CollectionSemantics.wrap.

Doc from org.hibernate.collection.spi.CollectionSemantics.wrap.

Wrap a raw collection in wrapper

Annotations
@Override