Examples of EOModel


Examples of org.objectstyle.wolips.eomodeler.core.model.EOModel

public class GenerateSQLAction extends EMAction {
  public void run(IAction action) {
    try {
      IStructuredSelection selection = getSelection();
      if (selection != null) {
        EOModel model = null;
        boolean modelSelected = false;
        List<String> entityNames = new LinkedList<String>();
        Iterator selectionIter = selection.iterator();
        while (!modelSelected && selectionIter.hasNext()) {
          Object obj = selectionIter.next();
          EOEntity entity = EOModelUtils.getRelatedEntity(obj);
          if (entity != null) {
            model = entity.getModel();
            entityNames.add(entity.getName());
          } else {
            model = EOModelUtils.getRelatedModel(obj);
            if (model != null) {
              modelSelected = true;
            }
          }
        }

        if (modelSelected) {
          entityNames = null;
        }

        if (model != null) {
          if (model.isDirty()) {
            MessageDialog.openWarning(getWindow().getShell(), "Model Not Saved", "Your model has unsaved changes. Unsaved changes will not be reflected in generated SQL.");
          }
          GenerateSQLDialog dialog = new GenerateSQLDialog(getWindow().getShell(), model, entityNames);
          dialog.open();
        }
View Full Code Here

Examples of org.openengsb.domain.example.model.EOModel

        assertNotNull(indexEngine);
    }

    @Test
    public void ekbCommit_shouldCreateIndexInherently() throws Exception {
        EOModel insert = new EOModel();
        insert.setEdbId("insert/1");

        EKBCommit ekbCommit = getTestEKBCommit();
        ekbCommit.addInsert(insert);

        ekb.commit(ekbCommit);

        Index<?> index = indexEngine.getIndex(insert.getClass());

        assertNotNull(index);
        assertEquals("org.openengsb.domain.example.model.EOModel", index.getName());
        assertEquals(insert.getClass(), index.getModelClass());

        assertNotNull(index.getHeadTableName());
        assertNotNull(index.getHistoryTableName());

        assertEquals(6, index.getFields().size());
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.