use of org.hibernate.procedure.ProcedureCallMemento in project hibernate-orm by hibernate.
the class NamedQueryRepository method registerNamedProcedureCallMemento.
public synchronized void registerNamedProcedureCallMemento(String name, ProcedureCallMemento memento) {
final Map<String, ProcedureCallMemento> copy = CollectionHelper.makeCopy(procedureCallMementoMap);
final ProcedureCallMemento previous = copy.put(name, memento);
if (previous != null) {
log.debugf("registering named procedure call definition [%s] overriding previously registered definition [%s]", name, previous);
}
this.procedureCallMementoMap = Collections.unmodifiableMap(copy);
}
use of org.hibernate.procedure.ProcedureCallMemento in project hibernate-orm by hibernate.
the class AbstractSharedSessionContract method getNamedProcedureCall.
@Override
@SuppressWarnings("UnnecessaryLocalVariable")
public ProcedureCall getNamedProcedureCall(String name) {
checkOpen();
final ProcedureCallMemento memento = factory.getNamedQueryRepository().getNamedProcedureCallMemento(name);
if (memento == null) {
throw new IllegalArgumentException("Could not find named stored procedure call with that registration name : " + name);
}
final ProcedureCall procedureCall = memento.makeProcedureCall(this);
// procedureCall.setComment( "Named stored procedure call [" + name + "]" );
return procedureCall;
}
Aggregations