Package org.objectstyle.wolips.eomodeler.core.model

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


    if (entity == null || !entity.equals(_masterEntityName)) {
      _masterEntityName = entity;
      firePropertyChange(MASTER_ENTITY_NAME, oldMasterEntityName, _masterEntityName);
      try {
        EOEntity eoentity = _wooModel.getModelGroup().getEntityNamed(entity);
        setMasterEntity(eoentity);
      }
      catch (Exception e) {
        setMasterEntity(null);
      }
View Full Code Here


    public void propertyChange(PropertyChangeEvent _event) {
      String propertyName = _event.getPropertyName();
      if (propertyName.equals(EORelationship.DEFINITION)) {
        JoinsTableEditor.this.definitionChanged();
      } else if (propertyName.equals(EORelationship.DESTINATION)) {
        EOEntity oldDestination = (EOEntity) _event.getOldValue();
        EOEntity newDestination = (EOEntity) _event.getNewValue();
        JoinsTableEditor.this.destinationChanged(oldDestination, newDestination);
      } else if (propertyName.equals(EORelationship.JOINS)) {
        JoinsTableEditor.this.updateJoins();
      }
    }
View Full Code Here

      text = model.getName();
      if (model.isDirty()) {
        text = text + "*";
      }
    } else if (_element instanceof EOEntity) {
      EOEntity entity = (EOEntity) _element;
      text = entity.getName();
    } else if (_element instanceof EOAttribute) {
      EOAttribute attribute = (EOAttribute) _element;
      text = attribute.getName();
    } else if (_element instanceof EORelationship) {
      EORelationship relationship = (EORelationship) _element;
View Full Code Here

  }

  public Font getFont(Object element) {
    Font font = null;
    if (element instanceof EOEntity) {
      EOEntity entity = (EOEntity) element;
      if (BooleanUtils.isTrue(entity.isAbstractEntity())) {
        font = getInheritedFont();
      }
    } else if (element instanceof EODatabaseConfig) {
      EODatabaseConfig databaseConfig = (EODatabaseConfig) element;
      if (databaseConfig.isActive()) {
View Full Code Here

          if ("plist".equals(possibleEditorFile.getFileExtension())) {
            String entityName = possibleEditorFile.getName();
            entityName = entityName.substring(0, entityName.indexOf('.'));
            EOModel eoModel = eomodelEditorPart.getModel();
            if (eoModel != null) {
              EOEntity entity = eoModel.getEntityNamed(entityName);
              eomodelEditorPart.setSelectedEntity(entity);
            }
          }
        }
      }
View Full Code Here

      for (EOModel model : _model.getModelGroup().getModels()) {
        model.removePropertyChangeListener(_modelListener);
        if (_entities != null) {
          Iterator oldEntitiesIter = _entities.iterator();
          while (oldEntitiesIter.hasNext()) {
            EOEntity entity = (EOEntity) oldEntitiesIter.next();
            entity.removePropertyChangeListener(_entityListener);
          }
        }
        if (_storedProcedures != null) {
          Iterator oldStoredProceduresIter = _storedProcedures.iterator();
          while (oldStoredProceduresIter.hasNext()) {
View Full Code Here

          }
        }

        Iterator newEntitiesIter = _entities.iterator();
        while (newEntitiesIter.hasNext()) {
          EOEntity entity = (EOEntity) newEntitiesIter.next();
          entity.addPropertyChangeListener(_entityListener);
        }
        model.addPropertyChangeListener(_modelListener);
      }
    }
  }
View Full Code Here

    }
    return model;
  }

  public static EOEntity getRelatedEntity(Object obj) {
    EOEntity entity = null;
    if (obj instanceof IEOEntityRelative) {
      entity = ((IEOEntityRelative) obj).getEntity();
    }
    return entity;
  }
View Full Code Here

        } else if (EOEntity.ATTRIBUTES.equals(changedPropertyName)) {
          refresh();
        } else if (EOEntity.ATTRIBUTE.equals(changedPropertyName)) {
          refresh();
        } else if (EOEntity.RELATIONSHIPS.equals(changedPropertyName)) {
          EOEntity entity = (EOEntity) event.getSource();
          EOModelTreeViewUpdater.this.refreshRelationshipsForEntity(entity);
        } else if (EOEntity.RELATIONSHIP.equals(changedPropertyName)) {
          EOEntity entity = (EOEntity) event.getSource();
          EOModelTreeViewUpdater.this.refreshRelationshipsForEntity(entity);
        } else if (EOEntity.ENTITY_INDEX.equals(changedPropertyName)) {
          refresh();
        } else if (EOEntity.ENTITY_INDEXES.equals(changedPropertyName)) {
          refresh();
View Full Code Here

        boolean modelSelected = false;
        List<EOEntity> entities = new LinkedList<EOEntity>();
        Iterator selectionIter = selection.iterator();
        while (!modelSelected && selectionIter.hasNext()) {
          Object obj = selectionIter.next();
          EOEntity entity = EOModelUtils.getRelatedEntity(obj);
          if (entity != null) {
            model = entity.getModel();
            entities.add(entity);
          } else {
            model = EOModelUtils.getRelatedModel(obj);
            if (model != null) {
              modelSelected = true;
View Full Code Here

TOP

Related Classes of org.objectstyle.wolips.eomodeler.core.model.EOEntity

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.