Search in sources :

Example 1 with ProcedureCallMemento

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);
}
Also used : ProcedureCallMemento(org.hibernate.procedure.ProcedureCallMemento)

Example 2 with ProcedureCallMemento

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;
}
Also used : ProcedureCallMemento(org.hibernate.procedure.ProcedureCallMemento) ProcedureCall(org.hibernate.procedure.ProcedureCall)

Aggregations

ProcedureCallMemento (org.hibernate.procedure.ProcedureCallMemento)2 ProcedureCall (org.hibernate.procedure.ProcedureCall)1