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

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


    for (EOModel model : _modelGroup.getModels()) {
      for (EOEntity entity : model.getEntities()) {
        if (entity.isPrototype()) {
          continue;
        }
        EOEntity parentEntity = entity.getParent();
        if (parentEntity != null) {
          _context.put("id", _ids.get(entity.getName() + "Parent"));
          _context.put("fromID", _ids.get(entity));
          _context.put("toID", _ids.get(parentEntity));
          _outputWriter.append(WOLipsVelocityUtils.writeTemplateToString(_velocityEngine, _context, "graffle/subEntity.vm"));
View Full Code Here


          if (entity.isPrototype()) {
            continue;
          }
          _ids.put(entity, nextID());
          _ids.put(entity.getName() + "Group", nextID());
          EOEntity parentEntity = entity.getParent();
          if (parentEntity != null) {
            _ids.put(entity.getName() + "Parent", nextID());
          }
          for (EOAttribute attribute : entity.getAttributes()) {
            _ids.put(attribute, nextID());
View Full Code Here

import org.objectstyle.wolips.eomodeler.core.model.EOAttribute;
import org.objectstyle.wolips.eomodeler.core.model.EOEntity;

public class EOAttributesContentProvider implements IStructuredContentProvider {
  public Object[] getElements(Object _inputElement) {
    EOEntity entity = (EOEntity) _inputElement;
    Set<EOAttribute> attributesList = entity.getAttributes();
    EOAttribute[] attributes = attributesList.toArray(new EOAttribute[attributesList.size()]);
    return attributes;
  }
View Full Code Here

  }

  public String getJavaTypeName() throws JavaModelException {
    String javaTypeName = _typeName;
    if (javaTypeName != null) {
      EOEntity entity = getModelGroup().getEntityNamed(_typeName);
      if (entity != null) {
        javaTypeName = entity.getClassName();
      }
      javaTypeName = BindingReflectionUtils.getFullClassName(_componentType.getJavaProject(), javaTypeName);
    }
    return javaTypeName;
  }
View Full Code Here

  }

  public String getJavaParameterTypeName() throws JavaModelException {
    String javaParameterTypeName = _parameterTypeName;
    if (javaParameterTypeName != null) {
      EOEntity entity = getModelGroup().getEntityNamed(_parameterTypeName);
      if (entity != null) {
        javaParameterTypeName = entity.getClassName();
      }
      javaParameterTypeName = BindingReflectionUtils.getFullClassName(_componentType.getJavaProject(), javaParameterTypeName);
    }
    return javaParameterTypeName;
  }
View Full Code Here

      EOModelObject jumpToModelObject = null;
      EORelationship inverseRelationship = relationship.getInverseRelationship();
      if (inverseRelationship != null) {
        jumpToModelObject = inverseRelationship;
      } else {
        EOEntity destination = relationship.getDestination();
        jumpToModelObject = destination;
      }
      if (jumpToModelObject != null) {
        Iterator selectionListenersIter = EORelationshipsTableViewer.this.getSelectionListeners().iterator();
        while (selectionListenersIter.hasNext()) {
View Full Code Here

import org.objectstyle.wolips.eomodeler.editors.entity.SubclassEntityDialog;

public class SubclassEntityAction extends EMAction {
  public void run(IAction action) {
    EOModel model = null;
    EOEntity entity = null;
    Object selectedObject = getSelectedObject();
    if (selectedObject instanceof EOModel) {
      model = (EOModel) selectedObject;
    } else if (selectedObject instanceof IEOEntityRelative) {
      entity = ((IEOEntityRelative) selectedObject).getEntity();
      model = entity.getModel();
    }
    if (model != null) {
      SubclassEntityDialog dialog = new SubclassEntityDialog(getWindow().getShell(), model, entity, model.getModelGroup().getEditingModel());
      dialog.setBlockOnOpen(true);
      int results = dialog.open();
      if (results == Window.OK) {
        String entityName = dialog.getEntityName();
        if (entityName != null && entityName.trim().length() > 0) {
          try {
            EOEntity parentEntity = dialog.getParentEntity();
            InheritanceType inheritanceType = dialog.getInheritanceType();
            String restrictingQualifier = dialog.getRestrictingQualifier();
            EOModel destinationModel = dialog.getDestinationModel();
            SubclassOperation operation = new SubclassOperation(parentEntity, inheritanceType, destinationModel, entityName, restrictingQualifier);
            operation.addContext(EOModelUtils.getUndoContext(model));
View Full Code Here

  public Object getComparisonValue(Object _obj, String _property) {
    EORelationship relationship = (EORelationship) _obj;
    Object value = null;
    if (EORelationship.DESTINATION.equals(_property)) {
      EOEntity destination = relationship.getDestination();
      if (destination != null) {
        value = destination.getName();
      }
    } else if (EOJoin.SOURCE_ATTRIBUTE.equals(_property)) {
      EOJoin firstJoin = relationship.getFirstJoin();
      if (firstJoin != null) {
        value = firstJoin.getSourceAttribute().getName();
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

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.