Examples of EntityEvent


Examples of org.apache.cayenne.map.event.EntityEvent

            ProjectUtil.cleanObjMappings(getProjectController().getCurrentDataMap());

            // fire a chain of "remove/add" events for entity
            // this seems to be the only way to refresh the view
            getProjectController().fireObjEntityEvent(
                new EntityEvent(this, ent, MapEvent.REMOVE));
            getProjectController().fireObjEntityEvent(new EntityEvent(this, ent, MapEvent.ADD));
        }
    }
View Full Code Here

Examples of org.apache.cayenne.map.event.EntityEvent

            }

            while (it.hasNext()) {
                ObjEntity entity = (ObjEntity) it.next();
                if (merger.synchronizeWithDbEntity(entity)) {
                    mediator.fireObjEntityEvent(new EntityEvent(
                            this,
                            entity,
                            MapEvent.CHANGE));
                }
            }
View Full Code Here

Examples of org.apache.cayenne.map.event.EntityEvent

                return;
            }

            if (merger.synchronizeWithDbEntity(entity)) {
                mediator
                        .fireObjEntityEvent(new EntityEvent(this, entity, MapEvent.CHANGE));
                mediator.fireObjEntityDisplayEvent(new EntityDisplayEvent(
                        this,
                        entity,
                        entity.getDataMap(),
                        mediator.getCurrentDataDomain()));
View Full Code Here

Examples of org.apache.cayenne.map.event.EntityEvent

    protected void removeDbEntity() {
        ProjectController mediator = getProjectController();
        DbEntity ent = mediator.getCurrentDbEntity();
        DataMap map = mediator.getCurrentDataMap();
        map.removeDbEntity(ent.getName(), true);
        mediator.fireDbEntityEvent(new EntityEvent(
                Application.getFrame(),
                ent,
                MapEvent.REMOVE));
    }
View Full Code Here

Examples of org.apache.cayenne.map.event.EntityEvent

        ProjectController mediator = getProjectController();
        ObjEntity entity = mediator.getCurrentObjEntity();

        DataMap map = mediator.getCurrentDataMap();
        map.removeObjEntity(entity.getName(), true);
        mediator.fireObjEntityEvent(new EntityEvent(
                Application.getFrame(),
                entity,
                MapEvent.REMOVE));

        // remove queries that depend on entity
View Full Code Here

Examples of org.apache.cayenne.map.event.EntityEvent

            if (EXCLUDED_TABLES.contains(entity.getName()) && entity.getDataMap() != null) {
                entity.getDataMap().removeDbEntity(entity.getName());
            }
            else if (existingMap) {
                mediator
                        .fireDbEntityEvent(new EntityEvent(this, entity, MapEvent.ADD));
            }
        }
View Full Code Here

Examples of org.apache.cayenne.map.event.EntityEvent

            checkCanceled();

            loadStatusNote = "Creating ObjEntity '" + entity.getName() + "'...";

            if (existingMap) {
                mediator.fireObjEntityEvent(new EntityEvent(this, entity, MapEvent.ADD));
            }
        }
View Full Code Here

Examples of org.apache.cayenne.map.event.EntityEvent

        public void dbEntityRemoved(DbEntity entity) {
            checkCanceled();

            if (existingMap) {
                mediator.fireDbEntityEvent(new EntityEvent(
                        Application.getFrame(),
                        entity,
                        MapEvent.REMOVE));
            }
        }
View Full Code Here

Examples of org.apache.cayenne.map.event.EntityEvent

        public void objEntityRemoved(ObjEntity entity) {
            checkCanceled();

            if (existingMap) {
                mediator.fireObjEntityEvent(new EntityEvent(Application
                        .getFrame(), entity, MapEvent.REMOVE));
            }
        }
View Full Code Here

Examples of org.apache.cayenne.map.event.EntityEvent

     */
    public void performAction(ActionEvent e) {
        ProjectController mediator = getProjectController();
        DbEntity entity = createEntity(mediator.getCurrentDataMap());

        mediator.fireDbEntityEvent(new EntityEvent(this, entity, MapEvent.ADD));
        EntityDisplayEvent displayEvent = new EntityDisplayEvent(this, entity, mediator
                .getCurrentDataMap(), mediator.getCurrentDataNode(), mediator
                .getCurrentDataDomain());
        mediator.fireDbEntityDisplayEvent(displayEvent);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.