Search in sources :

Example 1 with OuterJoinLoadable

use of org.hibernate.persister.entity.OuterJoinLoadable in project hibernate-orm by hibernate.

the class BatchFetchStrategyHelperTest method determineFetchMode.

private org.hibernate.FetchMode determineFetchMode(Class<?> entityClass, String path) {
    OuterJoinLoadable entityPersister = (OuterJoinLoadable) sessionFactory().getEntityPersister(entityClass.getName());
    int index = ((UniqueKeyLoadable) entityPersister).getPropertyIndex(path);
    return entityPersister.getFetchMode(index);
}
Also used : OuterJoinLoadable(org.hibernate.persister.entity.OuterJoinLoadable) UniqueKeyLoadable(org.hibernate.persister.entity.UniqueKeyLoadable)

Example 2 with OuterJoinLoadable

use of org.hibernate.persister.entity.OuterJoinLoadable in project hibernate-orm by hibernate.

the class BatchFetchStrategyHelperTest method determineAssociationType.

private AssociationType determineAssociationType(Class<?> entityClass, String path) {
    OuterJoinLoadable entityPersister = (OuterJoinLoadable) sessionFactory().getEntityPersister(entityClass.getName());
    int index = ((UniqueKeyLoadable) entityPersister).getPropertyIndex(path);
    return (AssociationType) entityPersister.getSubclassPropertyType(index);
}
Also used : OuterJoinLoadable(org.hibernate.persister.entity.OuterJoinLoadable) AssociationType(org.hibernate.type.AssociationType) UniqueKeyLoadable(org.hibernate.persister.entity.UniqueKeyLoadable)

Example 3 with OuterJoinLoadable

use of org.hibernate.persister.entity.OuterJoinLoadable in project hibernate-orm by hibernate.

the class FetchStrategyHelperTest method determineFetchMode.

private org.hibernate.FetchMode determineFetchMode(Class<?> entityClass, String path) {
    OuterJoinLoadable entityPersister = (OuterJoinLoadable) sessionFactory().getEntityPersister(entityClass.getName());
    int index = ((UniqueKeyLoadable) entityPersister).getPropertyIndex(path);
    return entityPersister.getFetchMode(index);
}
Also used : OuterJoinLoadable(org.hibernate.persister.entity.OuterJoinLoadable) UniqueKeyLoadable(org.hibernate.persister.entity.UniqueKeyLoadable)

Example 4 with OuterJoinLoadable

use of org.hibernate.persister.entity.OuterJoinLoadable in project hibernate-orm by hibernate.

the class FetchStrategyHelperTest method determineAssociationType.

private AssociationType determineAssociationType(Class<?> entityClass, String path) {
    OuterJoinLoadable entityPersister = (OuterJoinLoadable) sessionFactory().getEntityPersister(entityClass.getName());
    int index = ((UniqueKeyLoadable) entityPersister).getPropertyIndex(path);
    return (AssociationType) entityPersister.getSubclassPropertyType(index);
}
Also used : OuterJoinLoadable(org.hibernate.persister.entity.OuterJoinLoadable) AssociationType(org.hibernate.type.AssociationType) UniqueKeyLoadable(org.hibernate.persister.entity.UniqueKeyLoadable)

Example 5 with OuterJoinLoadable

use of org.hibernate.persister.entity.OuterJoinLoadable in project hibernate-orm by hibernate.

the class BasicCollectionLoadQueryDetails method applyRootReturnSelectFragments.

@Override
protected void applyRootReturnSelectFragments(SelectStatementBuilder selectStatementBuilder) {
    selectStatementBuilder.appendSelectClauseFragment(getQueryableCollection().selectFragment(getCollectionReferenceAliases().getCollectionTableAlias(), getCollectionReferenceAliases().getCollectionColumnAliases().getSuffix()));
    if (getQueryableCollection().isManyToMany()) {
        final OuterJoinLoadable elementPersister = (OuterJoinLoadable) getQueryableCollection().getElementPersister();
        selectStatementBuilder.appendSelectClauseFragment(elementPersister.selectFragment(getCollectionReferenceAliases().getElementTableAlias(), getCollectionReferenceAliases().getEntityElementAliases().getColumnAliases().getSuffix()));
    }
    super.applyRootReturnSelectFragments(selectStatementBuilder);
}
Also used : OuterJoinLoadable(org.hibernate.persister.entity.OuterJoinLoadable)

Aggregations

OuterJoinLoadable (org.hibernate.persister.entity.OuterJoinLoadable)22 Joinable (org.hibernate.persister.entity.Joinable)6 UniqueKeyLoadable (org.hibernate.persister.entity.UniqueKeyLoadable)6 AssociationType (org.hibernate.type.AssociationType)5 QueryableCollection (org.hibernate.persister.collection.QueryableCollection)4 SessionFactoryImplementor (org.hibernate.engine.spi.SessionFactoryImplementor)3 Configuration (org.hibernate.cfg.Configuration)2 EntityReturn (org.hibernate.loader.plan.spi.EntityReturn)2 LoadPlan (org.hibernate.loader.plan.spi.LoadPlan)2 AssociationKey (org.hibernate.persister.walking.spi.AssociationKey)2 EncapsulatedCompositeIdResultSetProcessorTest (org.hibernate.test.loadplans.process.EncapsulatedCompositeIdResultSetProcessorTest)2 Test (org.junit.Test)2 Iterator (java.util.Iterator)1 Dialect (org.hibernate.dialect.Dialect)1 FetchStrategy (org.hibernate.engine.FetchStrategy)1 FetchStyle (org.hibernate.engine.FetchStyle)1 Fetch (org.hibernate.engine.profile.Fetch)1 FetchProfile (org.hibernate.engine.profile.FetchProfile)1 CriteriaJoinWalker (org.hibernate.loader.criteria.CriteriaJoinWalker)1 CollectionFetchableElementEntityGraph (org.hibernate.loader.plan.build.internal.returns.CollectionFetchableElementEntityGraph)1