Package org.objectstyle.wolips.eomodeler.actions

Examples of org.objectstyle.wolips.eomodeler.actions.NewManyToManyRelationshipOperation


      if (_manyToMany) {
        String joinEntityName = _joinEntityNameText.getText();
        boolean flatten = _flattenButton.getSelection();

        NewManyToManyRelationshipOperation operation = new NewManyToManyRelationshipOperation(_sourceEntity, _destinationEntity, createRelationship, name, createInverseRelationship, inverseName, joinEntityName, flatten);
        operation.addContext(EOModelUtils.getUndoContext(_sourceEntity));
        IOperationHistory operationHistory = PlatformUI.getWorkbench().getOperationSupport().getOperationHistory();
        operationHistory.execute(operation, null, null);
        // _sourceEntity.joinInManyToManyWith(_destinationEntity,
        // createRelationship, name, createInverseRelationship,
        // inverseName, joinEntityName, flatten);
      } else {
        String fkName = null;
        String fkColumnName = null;
        boolean toMany = _toManyButton.getSelection();
        String inverseFKName = null;
        String inverseFKColumnName = null;
        boolean inverseToMany = _inverseToManyButton.getSelection();

        if (_createFK) {
          fkName = _fkNameText.getText();
          fkColumnName = _fkColumnNameText.getText();
        }
        if (_createInverseFK) {
          inverseFKName = _inverseFKNameText.getText();
          inverseFKColumnName = _inverseFKColumnNameText.getText();
        }

        NewOneToManyRelationshipOperation operation = new NewOneToManyRelationshipOperation(_relationship, _sourceEntity, name, createRelationship, toMany, _createFK, fkName, fkColumnName, _destinationEntity, inverseName, createInverseRelationship, inverseToMany, _createInverseFK, inverseFKName, inverseFKColumnName);
        operation.addContext(EOModelUtils.getUndoContext(_sourceEntity));
        IOperationHistory operationHistory = PlatformUI.getWorkbench().getOperationSupport().getOperationHistory();
        operationHistory.execute(operation, null, null);
      }
      super.okPressed();
    } catch (Throwable t) {
View Full Code Here

TOP

Related Classes of org.objectstyle.wolips.eomodeler.actions.NewManyToManyRelationshipOperation

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.