Search in sources :

Example 1 with ProcedureParameterListener

use of org.apache.cayenne.configuration.event.ProcedureParameterListener in project cayenne by apache.

the class ProjectController method fireProcedureParameterEvent.

/**
 * Informs all listeners of the ProcedureEvent. Does not send the event to
 * its originator.
 */
public void fireProcedureParameterEvent(ProcedureParameterEvent e) {
    setDirty(true);
    EventListener[] list = listenerList.getListeners(ProcedureParameterListener.class);
    for (EventListener eventListener : list) {
        ProcedureParameterListener listener = (ProcedureParameterListener) eventListener;
        switch(e.getId()) {
            case MapEvent.ADD:
                listener.procedureParameterAdded(e);
                break;
            case MapEvent.CHANGE:
                listener.procedureParameterChanged(e);
                break;
            case MapEvent.REMOVE:
                listener.procedureParameterRemoved(e);
                break;
            default:
                throw new IllegalArgumentException("Invalid ProcedureParameterEvent type: " + e.getId());
        }
    }
}
Also used : ProcedureParameterListener(org.apache.cayenne.configuration.event.ProcedureParameterListener) EventListener(java.util.EventListener)

Aggregations

EventListener (java.util.EventListener)1 ProcedureParameterListener (org.apache.cayenne.configuration.event.ProcedureParameterListener)1