Search in sources :

Example 1 with NamedProcedureCallDefinition

use of org.hibernate.cfg.annotations.NamedProcedureCallDefinition in project hibernate-orm by hibernate.

the class Configuration method reset.

protected void reset() {
    implicitNamingStrategy = ImplicitNamingStrategyJpaCompliantImpl.INSTANCE;
    physicalNamingStrategy = PhysicalNamingStrategyStandardImpl.INSTANCE;
    namedQueries = new HashMap<String, NamedQueryDefinition>();
    namedSqlQueries = new HashMap<String, NamedSQLQueryDefinition>();
    sqlResultSetMappings = new HashMap<String, ResultSetMappingDefinition>();
    namedEntityGraphMap = new HashMap<String, NamedEntityGraphDefinition>();
    namedProcedureCallMap = new HashMap<String, NamedProcedureCallDefinition>();
    standardServiceRegistryBuilder = new StandardServiceRegistryBuilder(bootstrapServiceRegistry);
    entityTuplizerFactory = new EntityTuplizerFactory();
    interceptor = EmptyInterceptor.INSTANCE;
    properties = new Properties();
    properties.putAll(standardServiceRegistryBuilder.getSettings());
}
Also used : StandardServiceRegistryBuilder(org.hibernate.boot.registry.StandardServiceRegistryBuilder) NamedQueryDefinition(org.hibernate.engine.spi.NamedQueryDefinition) Properties(java.util.Properties) NamedProcedureCallDefinition(org.hibernate.cfg.annotations.NamedProcedureCallDefinition) NamedEntityGraphDefinition(org.hibernate.cfg.annotations.NamedEntityGraphDefinition) NamedSQLQueryDefinition(org.hibernate.engine.spi.NamedSQLQueryDefinition) EntityTuplizerFactory(org.hibernate.tuple.entity.EntityTuplizerFactory) ResultSetMappingDefinition(org.hibernate.engine.ResultSetMappingDefinition)

Example 2 with NamedProcedureCallDefinition

use of org.hibernate.cfg.annotations.NamedProcedureCallDefinition in project hibernate-orm by hibernate.

the class InFlightMetadataCollectorImpl method addNamedProcedureCallDefinition.

@Override
public void addNamedProcedureCallDefinition(NamedProcedureCallDefinition definition) {
    if (definition == null) {
        throw new IllegalArgumentException("Named query definition is null");
    }
    final String name = definition.getRegisteredName();
    if (defaultNamedProcedureNames.contains(name)) {
        return;
    }
    final NamedProcedureCallDefinition previous = namedProcedureCallMap.put(name, definition);
    if (previous != null) {
        throw new DuplicateMappingException(DuplicateMappingException.Type.PROCEDURE, name);
    }
}
Also used : DuplicateMappingException(org.hibernate.DuplicateMappingException) NamedProcedureCallDefinition(org.hibernate.cfg.annotations.NamedProcedureCallDefinition)

Aggregations

NamedProcedureCallDefinition (org.hibernate.cfg.annotations.NamedProcedureCallDefinition)2 Properties (java.util.Properties)1 DuplicateMappingException (org.hibernate.DuplicateMappingException)1 StandardServiceRegistryBuilder (org.hibernate.boot.registry.StandardServiceRegistryBuilder)1 NamedEntityGraphDefinition (org.hibernate.cfg.annotations.NamedEntityGraphDefinition)1 ResultSetMappingDefinition (org.hibernate.engine.ResultSetMappingDefinition)1 NamedQueryDefinition (org.hibernate.engine.spi.NamedQueryDefinition)1 NamedSQLQueryDefinition (org.hibernate.engine.spi.NamedSQLQueryDefinition)1 EntityTuplizerFactory (org.hibernate.tuple.entity.EntityTuplizerFactory)1