Package org.apache.cayenne.modeler.action

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


        registerAction(new RemoveAction(application));
        registerAction(new CreateDomainAction(application));
        registerAction(new CreateNodeAction(application));
        registerAction(new CreateDataMapAction(application));
        registerAction(new GenerateCodeAction(application));
        registerAction(new CreateObjEntityAction(application));
        registerAction(new CreateDbEntityAction(application));
        registerAction(new CreateDerivedDbEntityAction(application));
        registerAction(new CreateProcedureAction(application));
        registerAction(new CreateProcedureParameterAction(application));
        registerAction(new RemoveProcedureParameterAction(application));
View Full Code Here


        registerAction(new RemoveAction(application));
        registerAction(new CreateDomainAction(application));
        registerAction(new CreateNodeAction(application));
        registerAction(new CreateDataMapAction(application));
        registerAction(new GenerateCodeAction(application));
        registerAction(new CreateObjEntityAction(application));
        registerAction(new CreateDbEntityAction(application));
        registerAction(new CreateProcedureAction(application));
        registerAction(new CreateProcedureParameterAction(application));
        registerAction(new RemoveProcedureParameterAction(application));
        registerAction(new CreateQueryAction(application));
View Full Code Here

                    for (ObjRelationship rel : entry.getValue()) {
                        relationshipAction.createObjRelationship(objEntity, rel);
                    }
                }

                CreateObjEntityAction action = (CreateObjEntityAction) actionManager
                        .getAction(CreateObjEntityAction.getActionName());
                action.createObjEntity(map, objEntity);

                break;
            }
            case DB_ENTITY: {

                for (Entry<DbEntity, List<DbRelationship>> entry : dbRelationshipMap
                        .entrySet()) {
                    DbEntity dbEntity = entry.getKey();
                    for (DbRelationship rel : entry.getValue()) {
                        relationshipAction.createDbRelationship(dbEntity, rel);
                    }
                }

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

                action.createEntity(map, dbEntity);

                break;
            }
            case QUERY: {
                this.domain = Application
                        .getInstance()
                        .getFrameController()
                        .getProjectController()
                        .findDomain(map);

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

                action.createQuery(domain, map, query);

                break;
            }
            case PROCEDURE: {
                CreateProcedureAction action = (CreateProcedureAction) actionManager
                        .getAction(CreateProcedureAction.getActionName());
                action.createProcedure(map, procedure);
                break;
            }
            case MAP_FROM_NODE: {
                this.dataNode.addDataMap(map);

                DataNodeEvent e = new DataNodeEvent(Application.getFrame(), this.dataNode);

                ProjectController controller = Application
                        .getInstance()
                        .getFrameController()
                        .getProjectController();

                e.setDomain(controller.findDomain(this.dataNode));

                controller.fireDataNodeEvent(e);
               
                break;
            }
            case MAP_FROM_DOMAIN: {
                CreateDataMapAction action = (CreateDataMapAction) actionManager
                        .getAction(CreateDataMapAction.getActionName());
                action.createDataMap(domain, map);
               
                break;
            }
            case NODE: {
                CreateNodeAction action = (CreateNodeAction) actionManager
                        .getAction(CreateNodeAction.getActionName());
                action.createDataNode(domain, dataNode);
               
                break;
            }

            case DOMAIN: {
                CreateDomainAction action = (CreateDomainAction) actionManager
                        .getAction(CreateDomainAction.getActionName());
                action.createDomain(domain);
               
                break;
            }

            case EMBEDDABLE: {
                CreateEmbeddableAction action = (CreateEmbeddableAction) actionManager
                        .getAction(CreateEmbeddableAction.getActionName());
                action.createEmbeddable(map, embeddable);
               
                break;
            }
        }
    }
View Full Code Here

        return "Create ObjEntity";
    }

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

        action.createObjEntity(map, objEntity);
    }
View Full Code Here

        return "Create ObjEntity";
    }

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

        action.createObjEntity(map, objEntity);
    }
View Full Code Here

                    for (ObjRelationship rel : entry.getValue()) {
                        relationshipAction.createObjRelationship(objEntity, rel);
                    }
                }

                CreateObjEntityAction action = actionManager
                        .getAction(CreateObjEntityAction.class);
                action.createObjEntity(map, objEntity);

                break;
            }
            case DB_ENTITY: {

                for (Entry<DbEntity, List<DbRelationship>> entry : dbRelationshipMap
                        .entrySet()) {
                    DbEntity dbEntity = entry.getKey();
                    for (DbRelationship rel : entry.getValue()) {
                        relationshipAction.createDbRelationship(dbEntity, rel);
                    }
                }

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

                action.createEntity(map, dbEntity);

                break;
            }
            case QUERY: {

                this.domain = (DataChannelDescriptor) Application
                        .getInstance()
                        .getFrameController()
                        .getProjectController()
                        .getProject()
                        .getRootNode();

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

                action.createQuery(domain, map, query);

                break;
            }
            case PROCEDURE: {
                CreateProcedureAction action = actionManager
                        .getAction(CreateProcedureAction.class);
                action.createProcedure(map, procedure);
                break;
            }
            case MAP_FROM_NODE: {
                this.dataNode.getDataMapNames().add(map.getName());

                DataNodeEvent e = new DataNodeEvent(Application.getFrame(), this.dataNode);

                ProjectController controller = Application
                        .getInstance()
                        .getFrameController()
                        .getProjectController();

                e
                        .setDomain((DataChannelDescriptor) controller
                                .getProject()
                                .getRootNode());

                controller.fireDataNodeEvent(e);

                break;
            }
            case MAP_FROM_DOMAIN: {
                CreateDataMapAction action = actionManager
                        .getAction(CreateDataMapAction.class);
                action.createDataMap(map);

                break;
            }
            case NODE: {
                CreateNodeAction action = actionManager.getAction(CreateNodeAction.class);
                action.createDataNode(dataNode);

                break;
            }

            case EMBEDDABLE: {
                CreateEmbeddableAction action = actionManager
                        .getAction(CreateEmbeddableAction.class);
                action.createEmbeddable(map, embeddable);

                break;
            }
        }
    }
View Full Code Here

TOP

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

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.