Examples of EOJoin


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

    return value;
  }

  protected boolean _modify(Object _element, String _property, Object _value) throws Throwable {
    boolean modified = false;
    EOJoin join = (EOJoin) _element;
    if (EOJoin.DESTINATION_ATTRIBUTE_NAME.equals(_property)) {
      Integer attributeIndex = (Integer) _value;
      int attributeIndexInt = attributeIndex.intValue();
      if (join.getRelationship().getDestination() != null) {
        String[] destinationAttributeNames = join.getRelationship().getDestination().getAttributeNames();
        String attributeName = (attributeIndexInt == -1) ? null : (String) destinationAttributeNames[attributeIndexInt];
        join.setDestinationAttributeName(attributeName);
      }
      modified = true;
    } else if (EOJoin.SOURCE_ATTRIBUTE_NAME.equals(_property)) {
      Integer attributeIndex = (Integer) _value;
      int attributeIndexInt = attributeIndex.intValue();
      if (join.getRelationship().getEntity() != null) {
        String[] sourceAttributeNames = join.getRelationship().getEntity().getAttributeNames();
        String attributeName = (attributeIndexInt == -1) ? null : (String) sourceAttributeNames[attributeIndexInt];
        join.setSourceAttributeName(attributeName);
      }
      modified = true;
    }
    return modified;
  }
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.