Package org.apache.cayenne.configuration.event

Examples of org.apache.cayenne.configuration.event.ProcedureEvent


     * Removes current Procedure from its DataMap and fires "remove" ProcedureEvent.
     */
    public void removeProcedure(DataMap map, Procedure procedure) {
        ProjectController mediator = getProjectController();

        ProcedureEvent e = new ProcedureEvent(
                Application.getFrame(),
                procedure,
                MapEvent.REMOVE);
        e.setDomain((DataChannelDescriptor) mediator.getProject().getRootNode());

        map.removeProcedure(procedure.getName());
        mediator.fireProcedureEvent(e);
    }
View Full Code Here


                if (!Util.nullSafeEquals(defaultCatalog, procedure.getCatalog())) {
                    procedure.setCatalog(defaultCatalog);

                    // any way to batch events, a big change will flood the app
                    // with procedure events..?
                    mediator.fireProcedureEvent(new ProcedureEvent(this, procedure));
                }
            }
        }
        view.dispose();
    }
View Full Code Here

     * Removes current Procedure from its DataMap and fires "remove" ProcedureEvent.
     */
    public void removeProcedure(DataMap map, Procedure procedure) {
        ProjectController mediator = getProjectController();

        ProcedureEvent e = new ProcedureEvent(
                Application.getFrame(),
                procedure,
                MapEvent.REMOVE);
        e.setDomain((DataChannelDescriptor) mediator.getProject().getRootNode());

        map.removeProcedure(procedure.getName());
        mediator.fireProcedureEvent(e);
    }
View Full Code Here

                if (!Util.nullSafeEquals(defaultSchema, procedure.getSchema())) {
                    procedure.setSchema(defaultSchema);

                    // any way to batch events, a big change will flood the app with
                    // procedure events..?
                    mediator.fireProcedureEvent(new ProcedureEvent(this, procedure));
                }
            }
        }
        shutdown();
    }
View Full Code Here

     * Removes current Procedure from its DataMap and fires "remove" ProcedureEvent.
     */
    public void removeProcedure(DataMap map, Procedure procedure) {
        ProjectController mediator = getProjectController();

        ProcedureEvent e = new ProcedureEvent(
                Application.getFrame(),
                procedure,
                MapEvent.REMOVE);
        e.setDomain((DataChannelDescriptor) mediator.getProject().getRootNode());

        map.removeProcedure(procedure.getName());
        mediator.fireProcedureEvent(e);
    }
View Full Code Here

    static void fireProcedureEvent(
            Object src,
            ProjectController mediator,
            DataMap dataMap,
            Procedure procedure) {
        mediator.fireProcedureEvent(new ProcedureEvent(src, procedure, MapEvent.ADD));
        mediator.fireProcedureDisplayEvent(new ProcedureDisplayEvent(
                src,
                procedure,
                mediator.getCurrentDataMap(),
                (DataChannelDescriptor) mediator.getProject().getRootNode()));
View Full Code Here

            public void itemStateChanged(ItemEvent e) {
                Procedure procedure = eventController.getCurrentProcedure();
                if (procedure != null && !ignoreChange) {
                    procedure.setReturningValue(returnsValue.isSelected());
                    eventController.fireProcedureEvent(new ProcedureEvent(
                            ProcedureTab.this,
                            procedure));
                }
            }
        });
View Full Code Here

        if (newName == null) {
            throw new ValidationException("Procedure name is required.");
        }
        else if (procedure.getDataMap().getProcedure(newName) == null) {
            // completely new name, set new name for entity
            ProcedureEvent e = new ProcedureEvent(this, procedure, procedure.getName());
            ProjectUtil.setProcedureName(procedure.getDataMap(), procedure, newName);
            eventController.fireProcedureEvent(e);
        }
        else {
            // there is an entity with the same name
View Full Code Here

        Procedure procedure = eventController.getCurrentProcedure();

        if (procedure != null && !Util.nullSafeEquals(procedure.getSchema(), text)) {
            procedure.setSchema(text);
            eventController.fireProcedureEvent(new ProcedureEvent(this, procedure));
        }
    }
View Full Code Here

        if (index >= 0) {
            table.select(index);

            // note that 'setCallParameters' is donw by copy internally
            parameter.getProcedure().setCallParameters(model.getObjectList());
            eventController.fireProcedureEvent(new ProcedureEvent(this, parameter
                    .getProcedure(), MapEvent.CHANGE));
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.configuration.event.ProcedureEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.