Examples of RemoveAttributeAction


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

        this.dataMap = dataMap;
    }

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

        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

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

        }
    }

    @Override
    public void undo() throws CannotUndoException {
        RemoveAttributeAction action = actionManager
                .getAction(RemoveAttributeAction.class);
        action.removeEmbeddableAttributes(embeddable, attrs);
    }
View Full Code Here

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

        action.paste(where, content, domain, map);
    }

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

        RemoveAction rAction = actionManager.getAction(RemoveAction.class);

        RemoveRelationshipAction rRelationShipAction = actionManager
                .getAction(RemoveRelationshipAction.class);

        RemoveProcedureParameterAction rProcedureParamAction = actionManager
                .getAction(RemoveProcedureParameterAction.class);

        if (content instanceof DataMap) {
            if (where instanceof DataChannelDescriptor) {
                rAction.removeDataMap((DataMap) content);
            }
            else if (where instanceof DataNodeDescriptor) {
                rAction.removeDataMapFromDataNode(
                        (DataNodeDescriptor) where,
                        (DataMap) content);
            }
        }
        else if (where instanceof DataMap) {
            if (content instanceof DbEntity) {
                rAction.removeDbEntity(map, (DbEntity) content);
            }
            else if (content instanceof ObjEntity) {
                rAction.removeObjEntity(map, (ObjEntity) content);
            }
            else if (content instanceof Embeddable) {
                rAction.removeEmbeddable(map, (Embeddable) content);
            }
            else if (content instanceof Query) {
                rAction.removeQuery(map, (Query) content);
            }
            else if (content instanceof Procedure) {
                rAction.removeProcedure(map, (Procedure) content);
            }
        }
        else if (where instanceof DbEntity) {
            if (content instanceof DbEntity) {
                rAction.removeDbEntity(map, (DbEntity) content);
            }
            else if (content instanceof DbAttribute) {
                rAttributeAction.removeDbAttributes(
                        map,
                        (DbEntity) where,
                        new DbAttribute[] {
                            (DbAttribute) content
                        });
            }
            else if (content instanceof DbRelationship) {
                rRelationShipAction.removeDbRelationships(
                        (DbEntity) where,
                        new DbRelationship[] {
                            (DbRelationship) content
                        });
            }
        }
        else if (where instanceof ObjEntity) {
            if (content instanceof ObjEntity) {
                rAction.removeObjEntity(map, (ObjEntity) content);
            }
            else if (content instanceof ObjAttribute) {
                rAttributeAction.removeObjAttributes(
                        (ObjEntity) where,
                        new ObjAttribute[] {
                            (ObjAttribute) content
                        });
            }
View Full Code Here

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

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

        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
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.