Search in sources :

Example 1 with DynamicResultBuilderEntityCalculated

use of org.hibernate.query.results.dynamic.DynamicResultBuilderEntityCalculated in project hibernate-orm by hibernate.

the class Builders method entityCalculated.

/**
 * Creates a EntityResultBuilder that does not allow any further configuring of the mapping.
 *
 * @see #entityCalculated(String, String, SessionFactoryImplementor)
 * @see NativeQuery#addEntity(String, Class, LockMode)
 * @see NativeQuery#addEntity(String, String, LockMode)
 */
public static DynamicResultBuilderEntityCalculated entityCalculated(String tableAlias, String entityName, LockMode explicitLockMode, SessionFactoryImplementor sessionFactory) {
    final RuntimeMetamodels runtimeMetamodels = sessionFactory.getRuntimeMetamodels();
    final EntityMappingType entityMapping = runtimeMetamodels.getEntityMappingType(entityName);
    return new DynamicResultBuilderEntityCalculated(entityMapping, tableAlias, explicitLockMode, sessionFactory);
}
Also used : RuntimeMetamodels(org.hibernate.metamodel.RuntimeMetamodels) EntityMappingType(org.hibernate.metamodel.mapping.EntityMappingType) DynamicResultBuilderEntityCalculated(org.hibernate.query.results.dynamic.DynamicResultBuilderEntityCalculated)

Aggregations

RuntimeMetamodels (org.hibernate.metamodel.RuntimeMetamodels)1 EntityMappingType (org.hibernate.metamodel.mapping.EntityMappingType)1 DynamicResultBuilderEntityCalculated (org.hibernate.query.results.dynamic.DynamicResultBuilderEntityCalculated)1