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

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


import org.objectstyle.wolips.eomodeler.core.model.EOArgument;
import org.objectstyle.wolips.eomodeler.core.model.EOStoredProcedure;

public class EOArgumentsContentProvider implements IStructuredContentProvider {
  public Object[] getElements(Object _inputElement) {
    EOStoredProcedure storedProcedure = (EOStoredProcedure) _inputElement;
    List<EOArgument> argumentsList = storedProcedure.getArguments();
    EOArgument[] arguments = argumentsList.toArray(new EOArgument[argumentsList.size()]);
    return arguments;
  }
View Full Code Here


  public String getText(Object _element) {
    String text = null;
    if (EOStoredProceduresListContentProvider.BLANK_STORED_PROCEDURE.equals(_element)) {
      // DO NOTHING
    } else if (_element instanceof EOStoredProcedure) {
      EOStoredProcedure storedProcedure = (EOStoredProcedure) _element;
      text = storedProcedure.getName();
    }
    return text;
  }
View Full Code Here

      text = fetchSpec.getName();
    } else if (_element instanceof EOArgument) {
      EOArgument argument = (EOArgument) _element;
      text = argument.getName();
    } else if (_element instanceof EOStoredProcedure) {
      EOStoredProcedure storedProcedure = (EOStoredProcedure) _element;
      text = storedProcedure.getName();
    } else if (_element instanceof EODatabaseConfig) {
      EODatabaseConfig databaseConfig = (EODatabaseConfig) _element;
      text = databaseConfig.getName();
    } else if (_element instanceof EOEntityIndex) {
      EOEntityIndex entityIndex = (EOEntityIndex) _element;
View Full Code Here

      EORelationshipPath relationshipPath = (EORelationshipPath) _parentElement;
      Set<AbstractEOAttributePath> relationshipPathChildren = new TreeSet<AbstractEOAttributePath>(new EOSortableEOModelObjectComparator());
      relationshipPathChildren.addAll(Arrays.asList(relationshipPath.getChildren()));
      children = relationshipPathChildren.toArray();
    } else if (_parentElement instanceof EOStoredProcedure) {
      EOStoredProcedure storedProcedure = (EOStoredProcedure) _parentElement;
      Set<EOArgument> arguments = new TreeSet<EOArgument>(new EOSortableEOModelObjectComparator());
      arguments.addAll(storedProcedure.getArguments());
      children = arguments.toArray();
    } else {
      children = new Object[0];
    }
    return children;
View Full Code Here

            AbstractEOAttributePath selectedAttributePath = (AbstractEOAttributePath) selectedObject;
            setSelectedEntity(selectedAttributePath.getChildIEOAttribute().getEntity());
            getEntityEditor().setSelection(new StructuredSelection(selectedAttributePath.getChildIEOAttribute()));
            setActivePage(getPageNum(EOModelEditor.EOENTITY_PAGE));
          } else if (selectedObject instanceof EOStoredProcedure) {
            EOStoredProcedure selectedStoredProcedure = (EOStoredProcedure) selectedObject;
            setSelectedStoredProcedure(selectedStoredProcedure);
            // setActivePage(EOModel)
          } else if (selectedObject instanceof EOArgument) {
            EOArgument selectedArgument = (EOArgument) selectedObject;
            setSelectedStoredProcedure(selectedArgument.getStoredProcedure());
View Full Code Here

      text = fetchSpec.getName();
    } else if (_element instanceof EOArgument) {
      EOArgument argument = (EOArgument) _element;
      text = argument.getName();
    } else if (_element instanceof EOStoredProcedure) {
      EOStoredProcedure storedProcedure = (EOStoredProcedure) _element;
      text = storedProcedure.getName();
    } else if (_element instanceof EODatabaseConfig) {
      EODatabaseConfig databaseConfig = (EODatabaseConfig) _element;
      text = databaseConfig.getName();
    } else if (_element instanceof EOEntityIndex) {
      EOEntityIndex entityIndex = (EOEntityIndex) _element;
View Full Code Here

      } else if (source == _useRawSQLButton) {
        _fetchSpecification.useCustomQueryExpression();
      } else if (source == _useStoredProcedureButton) {
        Iterator storedProceduresIter = _fetchSpecification.getEntity().getModel().getStoredProcedures().iterator();
        if (storedProceduresIter.hasNext()) {
          EOStoredProcedure storedProcedure = (EOStoredProcedure) storedProceduresIter.next();
          _fetchSpecification.setStoredProcedure(storedProcedure);
        }
      }
      updateButtonsEnabled();
      addBindings();
View Full Code Here

    addButtonListeners();
  }

  public void selectionChanged(SelectionChangedEvent event) {
    IStructuredSelection selection = (IStructuredSelection) event.getSelection();
    EOStoredProcedure storedProcedure = (EOStoredProcedure) selection.getFirstElement();
    _fetchSpecification.setStoredProcedure(storedProcedure);
  }
View Full Code Here

          }
        }
        if (_storedProcedures != null) {
          Iterator oldStoredProceduresIter = _storedProcedures.iterator();
          while (oldStoredProceduresIter.hasNext()) {
            EOStoredProcedure storedProcedure = (EOStoredProcedure) oldStoredProceduresIter.next();
            storedProcedure.removePropertyChangeListener(_storedProcedureListener);
          }
        }
      }
    }
  }
View Full Code Here

        _storedProcedures = new LinkedList<EOStoredProcedure>(model.getStoredProcedures());

        if (_storedProcedures != null) {
          Iterator oldStoredProceduresIter = _storedProcedures.iterator();
          while (oldStoredProceduresIter.hasNext()) {
            EOStoredProcedure storedProcedure = (EOStoredProcedure) oldStoredProceduresIter.next();
            storedProcedure.addPropertyChangeListener(_storedProcedureListener);
          }
        }

        Iterator newEntitiesIter = _entities.iterator();
        while (newEntitiesIter.hasNext()) {
View Full Code Here

TOP

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

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.