Package org.apache.cayenne.modeler.action

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


        registerAction(new CreateDerivedDbEntityAction(application));
        registerAction(new CreateProcedureAction(application));
        registerAction(new CreateProcedureParameterAction(application));
        registerAction(new RemoveProcedureParameterAction(application));
        registerAction(new CreateQueryAction(application));
        registerAction(new CreateAttributeAction(application));
        registerAction(new RemoveAttributeAction(application));
        registerAction(new CreateRelationshipAction(application));
        registerAction(new RemoveRelationshipAction(application));
        registerAction(new DbEntitySyncAction(application));
        registerAction(new ObjEntitySyncAction(application));
View Full Code Here


        registerAction(new CreateDbEntityAction(application));
        registerAction(new CreateProcedureAction(application));
        registerAction(new CreateProcedureParameterAction(application));
        registerAction(new RemoveProcedureParameterAction(application));
        registerAction(new CreateQueryAction(application));
        registerAction(new CreateAttributeAction(application));
        registerAction(new RemoveAttributeAction(application));
        registerAction(new CreateRelationshipAction(application));
        registerAction(new RemoveRelationshipAction(application));
        // start callback-related actions
        registerAction(new CreateCallbackMethodAction(application)).setAlwaysOn(true);
View Full Code Here

        return "Create Embeddable Attribute";
    }

    @Override
    public void redo() throws CannotRedoException {
        CreateAttributeAction action = (CreateAttributeAction) actionManager
                .getAction(CreateAttributeAction.getActionName());
        for (EmbeddableAttribute attr : attrs) {
            action.createEmbAttribute(embeddable, attr);
        }
    }
View Full Code Here

  private DbEntity dbEntity;
  private DbAttribute dbAttr;

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

    if (objEntity != null) {
      action.createObjAttribute(domain, dataMap, objEntity, objAttr);
    }

    if (dbEntity != null) {
      action.createDbAttribute(domain, dataMap, dbEntity, dbAttr);
    }
  }
View Full Code Here

    }

    @Override
    public void undo() throws CannotUndoException {

        CreateAttributeAction action = (CreateAttributeAction) actionManager
                .getAction(CreateAttributeAction.getActionName());

        if (objEntity != null) {
            for (ObjAttribute attr : objAttributes) {
                action.createObjAttribute(domain, dataMap, objEntity, attr);
            }
        }

        if (dbEntity != null) {
            for (DbAttribute attr : dbAttributes) {
                action.createDbAttribute(domain, dataMap, dbEntity, attr);
            }
        }

        if (embeddable != null) {
            for (EmbeddableAttribute attr : embeddableAttrs) {
                action.createEmbAttribute(embeddable, attr);
            }
        }

    }
View Full Code Here

        return "Create Embeddable Attribute";
    }

    @Override
    public void redo() throws CannotRedoException {
        CreateAttributeAction action = actionManager
                .getAction(CreateAttributeAction.class);
        for (EmbeddableAttribute attr : attrs) {
            action.createEmbAttribute(embeddable, attr);
        }
    }
View Full Code Here

    private DbEntity dbEntity;
    private DbAttribute dbAttr;

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

        if (objEntity != null) {
            action.createObjAttribute(dataMap, objEntity, objAttr);
        }

        if (dbEntity != null) {
            action.createDbAttribute(dataMap, dbEntity, dbAttr);
        }
    }
View Full Code Here

    }

    @Override
    public void undo() throws CannotUndoException {

        CreateAttributeAction action = actionManager
                .getAction(CreateAttributeAction.class);

        if (objEntity != null) {
            for (ObjAttribute attr : objAttributes) {
                action.createObjAttribute(dataMap, objEntity, attr);
            }
        }

        if (dbEntity != null) {
            for (DbAttribute attr : dbAttributes) {
                action.createDbAttribute(dataMap, dbEntity, attr);
            }
        }

        if (embeddable != null) {
            for (EmbeddableAttribute attr : embeddableAttrs) {
                action.createEmbAttribute(embeddable, attr);
            }
        }

    }
View Full Code Here

TOP

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

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.