Search in sources :

Example 1 with UniqueKeyLoadable

use of org.hibernate.persister.entity.UniqueKeyLoadable 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 UniqueKeyLoadable

use of org.hibernate.persister.entity.UniqueKeyLoadable 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 UniqueKeyLoadable

use of org.hibernate.persister.entity.UniqueKeyLoadable 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 UniqueKeyLoadable

use of org.hibernate.persister.entity.UniqueKeyLoadable 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 UniqueKeyLoadable

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

the class NoProxyFetchStrategyHelperTest 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)

Aggregations

UniqueKeyLoadable (org.hibernate.persister.entity.UniqueKeyLoadable)9 OuterJoinLoadable (org.hibernate.persister.entity.OuterJoinLoadable)6 AssociationType (org.hibernate.type.AssociationType)4 EntityUniqueKey (org.hibernate.engine.spi.EntityUniqueKey)3 Serializable (java.io.Serializable)2 Loadable (org.hibernate.persister.entity.Loadable)2 EntityType (org.hibernate.type.EntityType)2 Type (org.hibernate.type.Type)2 VersionType (org.hibernate.type.VersionType)2 SQLException (java.sql.SQLException)1 JdbcServices (org.hibernate.engine.jdbc.spi.JdbcServices)1 PersistenceContext (org.hibernate.engine.spi.PersistenceContext)1 SessionFactoryImplementor (org.hibernate.engine.spi.SessionFactoryImplementor)1 EntityFetch (org.hibernate.loader.plan.spi.EntityFetch)1 EntityPersister (org.hibernate.persister.entity.EntityPersister)1