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

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


    List<EOAttribute> attributes = new LinkedList<EOAttribute>();
    Iterator selectionIter = selection.iterator();
    while (selectionIter.hasNext()) {
      Object selectedObject = selectionIter.next();
      if (selectedObject instanceof EOAttribute) {
        EOAttribute selectedAttribute = (EOAttribute) selectedObject;
        if (selectedAttribute.getEntity().equals(parent)) {
          attributes.add(selectedAttribute);
        }
      }
    }
    EOEntityIndex entityIndex;
View Full Code Here


      }
    } 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;
      text = relationship.getName();
    } else if (_element instanceof EORelationshipPath) {
      EORelationshipPath relationshipPath = (EORelationshipPath) _element;
View Full Code Here

        text = destination.getName();
      }
    } else if (EOJoin.SOURCE_ATTRIBUTE.equals(property)) {
      EOJoin firstJoin = relationship.getFirstJoin();
      if (firstJoin != null) {
        EOAttribute sourceAttribute = firstJoin.getSourceAttribute();
        if (sourceAttribute != null) {
          text = sourceAttribute.getName();
        }
      }
    } else if (EOJoin.DESTINATION_ATTRIBUTE.equals(property)) {
      EOJoin firstJoin = relationship.getFirstJoin();
      if (firstJoin != null) {
        EOAttribute destinationAttribute = firstJoin.getDestinationAttribute();
        if (destinationAttribute != null) {
          text = destinationAttribute.getName();
        }
      }
    } else {
      text = super.getColumnText(element, property);
    }
View Full Code Here

          } 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());
            getEntityEditor().setSelection(_selection);
            setActivePage(getPageNum(EOModelEditor.EOENTITY_PAGE));
          } else if (selectedObject instanceof EORelationship) {
            EORelationship selectedRelationship = (EORelationship) selectedObject;
            setSelectedEntity(selectedRelationship.getEntity());
View Full Code Here

  }

  public String getText(Object _element) {
    String prototypeName = null;
    if (_element instanceof EOAttribute) {
      EOAttribute prototype = (EOAttribute) _element;
      prototypeName = prototype.getName();
    } else {
      prototypeName = Messages.getString("EOAttributesCellModifier.noPrototype");
    }
    return prototypeName;
  }
View Full Code Here

      }
    } 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;
      text = relationship.getName();
    } else if (_element instanceof EORelationshipPath) {
      EORelationshipPath relationshipPath = (EORelationshipPath) _element;
View Full Code Here

  public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
    _propertyChangeSupport.removePropertyChangeListener(propertyName, listener);
  }

  public void setSelectedAttribute(EOAttribute selectedAttribute) {
    EOAttribute oldAttribute = _selectedAttribute;
    _selectedAttribute = selectedAttribute;
    _propertyChangeSupport.firePropertyChange("selectedAttribute", oldAttribute, selectedAttribute);
  }
View Full Code Here

  protected EOAttribute createChild(EOEntity parent, Set<EOModelVerificationFailure> failures) throws EOModelException {
    return createAttribute(parent);
  }
 
  public static final EOAttribute createAttribute(EOEntity entity) throws DuplicateNameException {
    EOAttribute newAttribute = entity.addBlankAttribute(Messages.getString("EOAttribute.newName"));
    newAttribute.setAllowsNull(Boolean.valueOf(Activator.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.ALLOWS_NULL_DEFAULT_KEY)));
    newAttribute.setUsedForLocking(Boolean.valueOf(Activator.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.USED_FOR_LOCKING_DEFAULT_KEY)));
    return newAttribute;
  }
View Full Code Here

TOP

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

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.