Examples of EOEntity


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

      if (_showDatabaseConfigs) {
        modelChildren.addAll(model.getDatabaseConfigs());
      }
      children = modelChildren.toArray();
    } else if (_parentElement instanceof EOEntity) {
      EOEntity entity = (EOEntity) _parentElement;
      Set<EOModelObject> entityChildren = new TreeSet<EOModelObject>(new EOSortableEOModelObjectComparator());
      if (_showAttributes) {
        if (_showNonClassProperties) {
          entityChildren.addAll(entity.getAttributes());
        } else {
          entityChildren.addAll(entity.getClassAttributes());
        }
      }
      if (_showRelationships) {
        if (_showNonClassProperties) {
          entityChildren.addAll(entity.getRelationships());
        } else {
          entityChildren.addAll(entity.getClassRelationships());
        }
      }
      if (_showFetchSpecs) {
        entityChildren.addAll(entity.getFetchSpecs());
      }
      if (_showEntityIndexes) {
        entityChildren.addAll(entity.getEntityIndexes());
      }
      if (_showAttributes && _showRelationships) {
        entityChildren.addAll(entity.getChildrenEntities());
      }
      children = entityChildren.toArray();
    } else if (_parentElement instanceof EORelationship) {
      EORelationship relationship = (EORelationship) _parentElement;
      Set<AbstractEOAttributePath> relationshipPathChildren = new TreeSet<AbstractEOAttributePath>(new EOSortableEOModelObjectComparator());
View Full Code Here

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

            // EOModel selectedModel = (EOModel) selectedObject;
            setSelectedEntity(null);
            setSelectedStoredProcedure(null);
            setActivePage(getPageNum(EOModelEditor.EOMODEL_PAGE));
          } else if (selectedObject instanceof EOEntity) {
            EOEntity selectedEntity = (EOEntity) selectedObject;
            setSelectedEntity(selectedEntity);
            // setActivePage(EOModelEditor.EOENTITY_PAGE);
          } else if (selectedObject instanceof EOAttribute) {
            EOAttribute selectedAttribute = (EOAttribute) selectedObject;
            setSelectedEntity(selectedAttribute.getEntity());
View Full Code Here

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

  }

  protected void updateJoins() {
    if (myJoinsTableViewer != null) {
      myJoinsTableViewer.setInput(myRelationship);
      EOEntity source = myRelationship.getEntity();
      if (source != null) {
        TableColumn sourceColumn = TableUtils.getColumn(myJoinsTableViewer, EOJoin.class.getName(), EOJoin.SOURCE_ATTRIBUTE_NAME);
        if (sourceColumn != null) {
          sourceColumn.setText(source.getName());
          KeyComboBoxCellEditor sourceCellEditor = (KeyComboBoxCellEditor) TableUtils.getCellEditor(myJoinsTableViewer, EOJoin.class.getName(), EOJoin.SOURCE_ATTRIBUTE_NAME);
          sourceCellEditor.setItems(source.getAttributeNames());
        }
      }
      EOEntity destination = myRelationship.getDestination();
      if (destination != null) {
        TableColumn destinationColumn = TableUtils.getColumn(myJoinsTableViewer, EOJoin.class.getName(), EOJoin.DESTINATION_ATTRIBUTE_NAME);
        if (destinationColumn != null) {
          destinationColumn.setText(destination.getName());
          KeyComboBoxCellEditor destinationCellEditor = (KeyComboBoxCellEditor) TableUtils.getCellEditor(myJoinsTableViewer, EOJoin.class.getName(), EOJoin.DESTINATION_ATTRIBUTE_NAME);
          destinationCellEditor.setItems(destination.getAttributeNames());
        }
      }
      TableUtils.packTableColumns(myJoinsTableViewer);
    }
  }
View Full Code Here

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

    }
    return true;
  }

  public Object getValue(Object _element, String _property) {
    EOEntity entity = (EOEntity) _element;
    Object value = null;
    if (EOEntity.PARENT.equals(_property)) {
      EOEntity parent = entity.getParent();
      String parentName;
      if (parent == null) {
        parentName = EOEntitiesCellModifier.NO_PARENT_VALUE;
      } else {
        parentName = parent.getName();
      }
      value = new Integer(myEntityNames.indexOf(parentName));
    } else {
      value = super.getValue(_element, _property);
    }
View Full Code Here

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

  public void disposeBindings() {
    if (myRelationship != null) {
      myRelationship.removePropertyChangeListener(EORelationship.DEFINITION, myRelationshipListener);
      myRelationship.removePropertyChangeListener(EORelationship.DESTINATION, myRelationshipListener);
      myRelationship.removePropertyChangeListener(EORelationship.JOINS, myRelationshipListener);
      EOEntity destination = myRelationship.getDestination();
      if (destination != null) {
        destination.removePropertyChangeListener(EOEntity.ATTRIBUTE, myAttributesListener);
        destination.removePropertyChangeListener(EOEntity.ATTRIBUTES, myAttributesListener);
      }
    }
  }
View Full Code Here

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

    return value;
  }

  protected boolean _modify(Object _element, String _property, Object _value) throws Throwable {
    boolean modified = false;
    EOEntity entity = (EOEntity) _element;
    if (EOEntity.PARENT.equals(_property)) {
      Integer parentNameIndex = (Integer) _value;
      int parentNameIndexInt = parentNameIndex.intValue();
      String parentName = (parentNameIndexInt == -1) ? null : (String) myEntityNames.get(parentNameIndexInt);
      if (EOEntitiesCellModifier.NO_PARENT_VALUE.equals(parentName)) {
        entity.setParent(null);
      } else {
        EOEntity parent = entity.getModel().getModelGroup().getEntityNamed(parentName);
        entity.setParent(parent);
      }
      modified = true;
    }
    return modified;
View Full Code Here

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

    String oldEntityName = _entityName;
    if (entity == null || !entity.equals(_entityName)) {
      _entityName = entity;
      firePropertyChange(ENTITY_NAME, oldEntityName, _entityName);
      try {
        EOEntity eoentity = _wooModel.getModelGroup().getEntityNamed(entity);
        setEntity(eoentity);
      }
      catch (Exception e) {
        e.printStackTrace();
        setEntity(null);
View Full Code Here

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

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

    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

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

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