Package org.apache.cayenne.modeler.action

Examples of org.apache.cayenne.modeler.action.RemoveAttributeAction


        }
    }

    @Override
    public void undo() throws CannotUndoException {
        RemoveAttributeAction action = actionManager
                .getAction(RemoveAttributeAction.class);

        if (objEntity != null) {
            action.removeObjAttributes(objEntity, new ObjAttribute[] {
                objAttr
            });

            controller.fireObjEntityDisplayEvent(new EntityDisplayEvent(
                    this,
                    objEntity,
                    dataMap,
                    domain));
        }

        if (dbEntity != null) {
            action.removeDbAttributes(dataMap, dbEntity, new DbAttribute[] {
                dbAttr
            });

            controller.fireDbEntityDisplayEvent(new EntityDisplayEvent(
                    this,
View Full Code Here


        this.dataMap = dataMap;
    }

    @Override
    public void redo() throws CannotRedoException {
        RemoveAttributeAction action = actionManager
                .getAction(RemoveAttributeAction.class);

        if (objEntity != null) {
            action.removeObjAttributes(objEntity, objAttributes);
            controller.fireObjEntityDisplayEvent(new EntityDisplayEvent(
                    this,
                    objEntity,
                    dataMap,
                    domain));
        }

        if (dbEntity != null) {
            action.removeDbAttributes(dbEntity.getDataMap(), dbEntity, dbAttributes);
            controller.fireDbEntityDisplayEvent(new EntityDisplayEvent(
                    this,
                    dbEntity,
                    dataMap,
                    domain));
        }

        if (embeddable != null) {
            action.removeEmbeddableAttributes(embeddable, embeddableAttrs);
            controller.fireEmbeddableDisplayEvent(new EmbeddableDisplayEvent(
                    this,
                    embeddable,
                    dataMap,
                    domain));
View Full Code Here

TOP

Related Classes of org.apache.cayenne.modeler.action.RemoveAttributeAction

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.