Top Description Methods
org.hibernate.loader.plan.build.spi

public Interface ExpandingQuerySpaces

extends QuerySpaces
Known Direct Implementers
org.hibernate.loader.plan.build.internal.spaces.QuerySpacesImpl
Imports
org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.loader.plan.build.internal.spaces.CompositePropertyMapping, org.hibernate.loader.plan.spi.QuerySpaces, org.hibernate.persister.collection.CollectionPersister, org.hibernate.persister.entity.EntityPersister

Models a collection of org.hibernate.loader.plan.spi.QuerySpace references and exposes the ability to create an ExpandingQuerySpace for "returns" and fetches; used when building a load plan.
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The unique ID.
generateImplicitUid
()

Generate a unique ID to be used when creating an ExpandingQuerySpace.

public SessionFactoryImplementor

Returns:

The session factory.
getSessionFactory
()

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
Gets the session factory.
public ExpandingCollectionQuerySpace

Returns:

the ExpandingCollectionQuerySpace with the specified unique ID.
makeCollectionQuerySpace
(String
The unique ID for the collection query space.
uid
,
CollectionPersister
The collection persister.
collectionPersister
,
boolean
true if joins added to the returned value can be required joins; false, otherwise.
canJoinsBeRequired
)

Create an ExpandingCollectionQuerySpace for a collection (that is not a "return") with the specified unique ID. The unique ID should be generated using generateImplicitUid(), A unique suffix may be added to the unique ID for an existing org.hibernate.loader.plan.spi.QuerySpace.

public ExpandingCompositeQuerySpace

Returns:

the ExpandingCompositeQuerySpace with the specified unique ID.
makeCompositeQuerySpace
(String
The unique ID for the composite query space.
uid
,
CompositePropertyMapping
The composite property mapping.
compositePropertyMapping
,
boolean
true if joins added to the returned value can be required joins; false, otherwise.
canJoinsBeRequired
)

Create an ExpandingCompositeQuerySpace for a composite with the specified unique ID. The unique ID should be generated using generateImplicitUid(), A unique suffix may be added to the unique ID for an existing org.hibernate.loader.plan.spi.QuerySpace.

public ExpandingEntityQuerySpace

Returns:

the ExpandingEntityQuerySpace with the specified unique ID.
makeEntityQuerySpace
(String
The unique ID for the entity query space.
uid
,
EntityPersister
The entity persister.
entityPersister
,
boolean
true if joins added to the returned value can be required joins; false, otherwise.
canJoinsBeRequired
)

Create an ExpandingEntityQuerySpace for an entity (that is not a "return") with the specified unique ID. The unique ID should be generated using generateImplicitUid(), A unique suffix may be added to the unique ID for an existing org.hibernate.loader.plan.spi.QuerySpace.

public ExpandingCollectionQuerySpace

Returns:

the ExpandingCollectionQuerySpace with the specified unique ID.
makeRootCollectionQuerySpace
(String
The unique ID for the root collection query space.
uid
,
CollectionPersister
The collection persister.
collectionPersister
)

Create an ExpandingCollectionQuerySpace for a collection "return" with the specified unique ID. The unique ID should be generated using generateImplicitUid(), A unique suffix may be added to the unique ID for an existing org.hibernate.loader.plan.spi.QuerySpace.

public ExpandingEntityQuerySpace

Returns:

the ExpandingEntityQuerySpace with the specified unique ID.
makeRootEntityQuerySpace
(String
The unique ID for the root entity query space.
uid
,
EntityPersister
The entity persister.
entityPersister
)

Create an ExpandingEntityQuerySpace for an entity "return" with the specified unique ID. The unique ID should be generated using generateImplicitUid(), A unique suffix may be added to the unique ID for an existing org.hibernate.loader.plan.spi.QuerySpace.

Inherited from org.hibernate.loader.plan.spi.QuerySpaces:
findQuerySpaceByUidgetQuerySpaceByUidgetRootQuerySpaces

Method Detail

generateImplicitUidback to summary
public String generateImplicitUid()

Generate a unique ID to be used when creating an ExpandingQuerySpace.

Using this method to generate a unique ID ensures that this object does not contain a org.hibernate.loader.plan.spi.QuerySpace with the returned unique ID.

Returns:String

The unique ID.

getSessionFactoryback to summary
public SessionFactoryImplementor getSessionFactory()

Deprecated

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

Gets the session factory.

Returns:SessionFactoryImplementor

The session factory.

makeCollectionQuerySpaceback to summary
public ExpandingCollectionQuerySpace makeCollectionQuerySpace(String uid, CollectionPersister collectionPersister, boolean canJoinsBeRequired)

Create an ExpandingCollectionQuerySpace for a collection (that is not a "return") with the specified unique ID. The unique ID should be generated using generateImplicitUid(), A unique suffix may be added to the unique ID for an existing org.hibernate.loader.plan.spi.QuerySpace. In this case, it is the caller's responsibility to ensure uniqueness.

Parameters
uid:String

The unique ID for the collection query space.

collectionPersister:CollectionPersister

The collection persister.

canJoinsBeRequired:boolean

true if joins added to the returned value can be required joins; false, otherwise.

Returns:ExpandingCollectionQuerySpace

the ExpandingCollectionQuerySpace with the specified unique ID.

Exceptions
IllegalStateException:
if there is already a query space with the specified unique ID.
See Also
org.hibernate.loader.plan.spi.Join
makeCompositeQuerySpaceback to summary
public ExpandingCompositeQuerySpace makeCompositeQuerySpace(String uid, CompositePropertyMapping compositePropertyMapping, boolean canJoinsBeRequired)

Create an ExpandingCompositeQuerySpace for a composite with the specified unique ID. The unique ID should be generated using generateImplicitUid(), A unique suffix may be added to the unique ID for an existing org.hibernate.loader.plan.spi.QuerySpace. In this case, it is the caller's responsibility to ensure uniqueness.

Parameters
uid:String

The unique ID for the composite query space.

compositePropertyMapping:CompositePropertyMapping

The composite property mapping.

canJoinsBeRequired:boolean

true if joins added to the returned value can be required joins; false, otherwise.

Returns:ExpandingCompositeQuerySpace

the ExpandingCompositeQuerySpace with the specified unique ID.

Exceptions
IllegalStateException:
if there is already a query space with the specified unique ID.
See Also
org.hibernate.loader.plan.spi.Join
makeEntityQuerySpaceback to summary
public ExpandingEntityQuerySpace makeEntityQuerySpace(String uid, EntityPersister entityPersister, boolean canJoinsBeRequired)

Create an ExpandingEntityQuerySpace for an entity (that is not a "return") with the specified unique ID. The unique ID should be generated using generateImplicitUid(), A unique suffix may be added to the unique ID for an existing org.hibernate.loader.plan.spi.QuerySpace. In this case, it is the caller's responsibility to ensure uniqueness.

Parameters
uid:String

The unique ID for the entity query space.

entityPersister:EntityPersister

The entity persister.

canJoinsBeRequired:boolean

true if joins added to the returned value can be required joins; false, otherwise.

Returns:ExpandingEntityQuerySpace

the ExpandingEntityQuerySpace with the specified unique ID.

Exceptions
IllegalStateException:
if there is already a query space with the specified unique ID.
See Also
org.hibernate.loader.plan.spi.Join
makeRootCollectionQuerySpaceback to summary
public ExpandingCollectionQuerySpace makeRootCollectionQuerySpace(String uid, CollectionPersister collectionPersister)

Create an ExpandingCollectionQuerySpace for a collection "return" with the specified unique ID. The unique ID should be generated using generateImplicitUid(), A unique suffix may be added to the unique ID for an existing org.hibernate.loader.plan.spi.QuerySpace. In this case, it is the caller's responsibility to ensure uniqueness.

Parameters
uid:String

The unique ID for the root collection query space.

collectionPersister:CollectionPersister

The collection persister.

Returns:ExpandingCollectionQuerySpace

the ExpandingCollectionQuerySpace with the specified unique ID.

Exceptions
IllegalStateException:
if there is already a query space with the specified unique ID.
See Also
org.hibernate.loader.plan.spi.CollectionReturn
makeRootEntityQuerySpaceback to summary
public ExpandingEntityQuerySpace makeRootEntityQuerySpace(String uid, EntityPersister entityPersister)

Create an ExpandingEntityQuerySpace for an entity "return" with the specified unique ID. The unique ID should be generated using generateImplicitUid(), A unique suffix may be added to the unique ID for an existing org.hibernate.loader.plan.spi.QuerySpace. In this case, it is the caller's responsibility to ensure uniqueness.

Parameters
uid:String

The unique ID for the root entity query space.

entityPersister:EntityPersister

The entity persister.

Returns:ExpandingEntityQuerySpace

the ExpandingEntityQuerySpace with the specified unique ID.

Exceptions
IllegalStateException:
if there is already a query space with the specified unique ID.
See Also
org.hibernate.loader.plan.spi.EntityReturn