Top Fields Constructors Methods
org.hibernate.loader.plan.build.internal.spaces

public Class QuerySpacesImpl

extends Object
implements ExpandingQuerySpaces
Class Inheritance
All Implemented Interfaces
org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces, org.hibernate.loader.plan.spi.QuerySpaces
Imports
java.util.ArrayList, .List, .Map, java.util.concurrent.ConcurrentHashMap, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.internal.CoreLogging, org.hibernate.loader.plan.build.spi.ExpandingCollectionQuerySpace, .ExpandingCompositeQuerySpace, .ExpandingEntityQuerySpace, .ExpandingQuerySpaces, org.hibernate.loader.plan.spi.QuerySpace, .QuerySpaceUidNotRegisteredException, org.hibernate.persister.collection.CollectionPersister, org.hibernate.persister.entity.EntityPersister, org.jboss.logging.Logger

Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private int
private static final Logger
private final Map<String, QuerySpace>
private final List<QuerySpace>
private final SessionFactoryImplementor
sessionFactory

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Constructor Summary

AccessConstructor and Description
public
QuerySpacesImpl(SessionFactoryImplementor sessionFactory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Method Summary

Modifier and TypeMethod and Description
private void
public QuerySpace
findQuerySpaceByUid(String
The QuerySpace uid to match
uid
)

Implements org.hibernate.loader.plan.spi.QuerySpaces.findQuerySpaceByUid.

Locate a QuerySpace by its uid.
public String
public QuerySpace
getQuerySpaceByUid(String
The uid to resolve
uid
)

Implements org.hibernate.loader.plan.spi.QuerySpaces.getQuerySpaceByUid.

Like findQuerySpaceByUid, except that here an exception is thrown if the uid cannot be resolved.
public List<QuerySpace>
getRootQuerySpaces()

Implements org.hibernate.loader.plan.spi.QuerySpaces.getRootQuerySpaces.

Gets the root QuerySpace references.
public SessionFactoryImplementor
getSessionFactory()

Implements org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces.getSessionFactory.

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
Gets the session factory.
public ExpandingCollectionQuerySpace
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
)

Implements org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces.makeCollectionQuerySpace.

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
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
)

Implements org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces.makeCompositeQuerySpace.

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
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
)

Implements org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces.makeEntityQuerySpace.

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
makeRootCollectionQuerySpace(String
The unique ID for the root collection query space.
uid
,
CollectionPersister
The collection persister.
collectionPersister
)

Implements org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces.makeRootCollectionQuerySpace.

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
makeRootEntityQuerySpace(String
The unique ID for the root entity query space.
uid
,
EntityPersister
The entity persister.
entityPersister
)

Implements org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces.makeRootEntityQuerySpace.

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.
private void
registerQuerySpace(QuerySpace
The space
querySpace
)

Feeds a QuerySpace into this spaces group.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

implicitUidBaseback to summary
private int implicitUidBase
logback to summary
private static final Logger log
querySpaceByUidback to summary
private final Map<String, QuerySpace> querySpaceByUid
rootsback to summary
private final List<QuerySpace> roots
sessionFactoryback to summary
private final SessionFactoryImplementor sessionFactory

Deprecated

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

Constructor Detail

QuerySpacesImplback to summary
public QuerySpacesImpl(SessionFactoryImplementor sessionFactory)

Deprecated

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

Method Detail

checkQuerySpaceDoesNotExistback to summary
private void checkQuerySpaceDoesNotExist(String uid)
findQuerySpaceByUidback to summary
public QuerySpace findQuerySpaceByUid(String uid)

Implements org.hibernate.loader.plan.spi.QuerySpaces.findQuerySpaceByUid.

Doc from org.hibernate.loader.plan.spi.QuerySpaces.findQuerySpaceByUid.

Locate a QuerySpace by its uid.

Parameters
uid:String

The QuerySpace uid to match

Returns:QuerySpace

The match, null is returned if no match.

Annotations
@Override
generateImplicitUidback to summary
public String generateImplicitUid()

Implements org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces.generateImplicitUid.

Doc from org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces.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.

Annotations
@Override
getQuerySpaceByUidback to summary
public QuerySpace getQuerySpaceByUid(String uid)

Implements org.hibernate.loader.plan.spi.QuerySpaces.getQuerySpaceByUid.

Doc from org.hibernate.loader.plan.spi.QuerySpaces.getQuerySpaceByUid.

Like findQuerySpaceByUid, except that here an exception is thrown if the uid cannot be resolved.

Parameters
uid:String

The uid to resolve

Returns:QuerySpace

The QuerySpace

Annotations
@Override
getRootQuerySpacesback to summary
public List<QuerySpace> getRootQuerySpaces()

Implements org.hibernate.loader.plan.spi.QuerySpaces.getRootQuerySpaces.

Doc from org.hibernate.loader.plan.spi.QuerySpaces.getRootQuerySpaces.

Gets the root QuerySpace references.

Returns:List<QuerySpace>

The roots

Annotations
@Override
getSessionFactoryback to summary
public SessionFactoryImplementor getSessionFactory()

Implements org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces.getSessionFactory.

Doc from org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces.getSessionFactory.

Deprecated

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

Gets the session factory.

Returns:SessionFactoryImplementor

The session factory.

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

Implements org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces.makeCollectionQuerySpace.

Doc from org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces.makeCollectionQuerySpace.

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.

Annotations
@Override
makeCompositeQuerySpaceback to summary
public ExpandingCompositeQuerySpace makeCompositeQuerySpace(String uid, CompositePropertyMapping compositePropertyMapping, boolean canJoinsBeRequired)

Implements org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces.makeCompositeQuerySpace.

Doc from org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces.makeCompositeQuerySpace.

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.

Annotations
@Override
makeEntityQuerySpaceback to summary
public ExpandingEntityQuerySpace makeEntityQuerySpace(String uid, EntityPersister entityPersister, boolean canJoinsBeRequired)

Implements org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces.makeEntityQuerySpace.

Doc from org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces.makeEntityQuerySpace.

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.

Annotations
@Override
makeRootCollectionQuerySpaceback to summary
public ExpandingCollectionQuerySpace makeRootCollectionQuerySpace(String uid, CollectionPersister collectionPersister)

Implements org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces.makeRootCollectionQuerySpace.

Doc from org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces.makeRootCollectionQuerySpace.

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.

Annotations
@Override
makeRootEntityQuerySpaceback to summary
public ExpandingEntityQuerySpace makeRootEntityQuerySpace(String uid, EntityPersister entityPersister)

Implements org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces.makeRootEntityQuerySpace.

Doc from org.hibernate.loader.plan.build.spi.ExpandingQuerySpaces.makeRootEntityQuerySpace.

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.

Annotations
@Override
registerQuerySpaceback to summary
private void registerQuerySpace(QuerySpace querySpace)

Feeds a QuerySpace into this spaces group.

Parameters
querySpace:QuerySpace

The space