Package org.objectstyle.wolips.eomodeler.core.kvc

Examples of org.objectstyle.wolips.eomodeler.core.kvc.KeyPath


  public void modify(Object _element, String _property, Object _value) {
    try {
      TableItem tableItem = (TableItem) _element;
      Object obj = tableItem.getData();
      if (!_modify(obj, _property, _value)) {
        KeyPath keyPath = (KeyPath) myKeys.get(_property);
        if (keyPath == null) {
          keyPath = new CachingKeyPath(_property);
          myKeys.put(_property, keyPath);
        }
        keyPath.setValue(obj, _value);
      }
      myTableViewer.refresh(obj);
    } catch (Throwable t) {
      ErrorUtils.openErrorDialog(Display.getDefault().getActiveShell(), t);
    }
View Full Code Here


      entity1ToManyRelationship.setPropagatesPrimaryKey(Boolean.TRUE);
      entity1ToManyRelationship.setDeleteRule(EODeleteRule.CASCADE);
      addRelationship(entity1ToManyRelationship);

      if (_flatten) {
        EORelationship entity1ToManyFlattenedRelationship = new EORelationship(_relationshipName, new KeyPath(new String[] { entity1ToManyRelationship.getName(), entity2Relationship.getName() }).toKeyPath());
        entity1ToManyFlattenedRelationship.setClassProperty(Boolean.TRUE);
        addRelationship(entity1ToManyFlattenedRelationship);
      }
    }

    if (createInverseRelationship) {
      String entity2ToManyName;
      if (_flatten) {
        entity2ToManyName = StringUtils.toPlural(StringUtils.toLowercaseFirstLetter(manyToManyEntity.getName()));
      } else {
        entity2ToManyName = _inverseRelationshipName;
      }
      EORelationship entity2ToManyRelationship = entity2Relationship.createInverseRelationshipNamed(entity2ToManyName, true);
      entity2ToManyRelationship.setClassProperty(Boolean.valueOf(!_flatten));
      entity2ToManyRelationship.setPropagatesPrimaryKey(Boolean.TRUE);
      entity2ToManyRelationship.setDeleteRule(EODeleteRule.CASCADE);
      _entity2.addRelationship(entity2ToManyRelationship);

      if (_flatten) {
        EORelationship entity2ToManyFlattenedRelationship = new EORelationship(_inverseRelationshipName, new KeyPath(new String[] { entity2ToManyRelationship.getName(), entity1Relationship.getName() }).toKeyPath());
        entity2ToManyFlattenedRelationship.setClassProperty(Boolean.TRUE);
        _entity2.addRelationship(entity2ToManyFlattenedRelationship);
      }
    }
View Full Code Here

  public TablePropertyLabelProvider(String[] _columnProperties) {
    myColumnProperties = _columnProperties;
    myKeys = new HashMap();
    for (int keyNum = 0; keyNum < _columnProperties.length; keyNum++) {
      KeyPath keyPath = new CachingKeyPath(_columnProperties[keyNum]);
      myKeys.put(_columnProperties[keyNum], keyPath);
    }
  }
View Full Code Here

 
  public TablePropertyViewerSorter(String[] columnProperties) {
    myColumnProperties = columnProperties;
    myKeys = new HashMap();
    for (int keyNum = 0; keyNum < columnProperties.length; keyNum++) {
      KeyPath keyPath = new CachingKeyPath(columnProperties[keyNum]);
      myKeys.put(columnProperties[keyNum], keyPath);
    }
  }
View Full Code Here

TOP

Related Classes of org.objectstyle.wolips.eomodeler.core.kvc.KeyPath

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.