Search in sources :

Example 1 with ProcedureParameterDisplayListener

use of org.apache.cayenne.modeler.event.ProcedureParameterDisplayListener in project cayenne by apache.

the class ProjectController method fireProcedureParameterDisplayEvent.

public void fireProcedureParameterDisplayEvent(ProcedureParameterDisplayEvent e) {
    boolean changed = !Arrays.equals(e.getProcedureParameters(), currentState.procedureParameters);
    if (changed) {
        if (currentState.procedure != e.getProcedure()) {
            clearState();
            currentState.domain = e.getDomain();
            currentState.map = e.getDataMap();
            currentState.procedure = e.getProcedure();
        }
        currentState.procedureParameters = e.getProcedureParameters();
    }
    EventListener[] list = listenerList.getListeners(ProcedureParameterDisplayListener.class);
    for (EventListener eventListener : list) {
        ProcedureParameterDisplayListener listener = (ProcedureParameterDisplayListener) eventListener;
        listener.currentProcedureParameterChanged(e);
    }
}
Also used : EventListener(java.util.EventListener) ProcedureParameterDisplayListener(org.apache.cayenne.modeler.event.ProcedureParameterDisplayListener)

Aggregations

EventListener (java.util.EventListener)1 ProcedureParameterDisplayListener (org.apache.cayenne.modeler.event.ProcedureParameterDisplayListener)1