Examples of EOFetchSpecification


Examples of com.webobjects.eocontrol.EOFetchSpecification

      boolean objectsMayGetAdded = includeNewObjects || includeNewObjectsInParentEditingContext || filterUpdatedObjects;
      NSArray<EOSortOrdering> fetchSortOrderings = sortOrderings;
      if (objectsMayGetAdded) {
        fetchSortOrderings = null;
      }
        EOFetchSpecification fs = new EOFetchSpecification(entityName, qualifier, fetchSortOrderings);
        fs.setFetchLimit(fetchLimit);
        fs.setPrefetchingRelationshipKeyPaths(prefetchKeyPaths);
        fs.setIsDeep(isDeep);
        fs.setUsesDistinct(usesDistinct);
        fs.setHints(hints);
        NSArray matchingObjects = editingContext.objectsWithFetchSpecification(fs);
       
        matchingObjects = filteredObjectsWithQualifier(editingContext, matchingObjects, entityName, qualifier, sortOrderings, usesDistinct, isDeep, includeNewObjects, includeNewObjectsInParentEditingContext, filterUpdatedObjects, removeDeletedObjects);
     
      return matchingObjects;
View Full Code Here

Examples of com.webobjects.eocontrol.EOFetchSpecification

     * @param qualifier the qualifier to restrict by
     * @return the single object of the given type matching the qualifier or null if no matching object found
     * @throws MoreThanOneException if more than one object matches the qualifier
     */
    public static EOEnterpriseObject objectWithQualifier(EOEditingContext editingContext, String entityName, EOQualifier qualifier) {
        EOFetchSpecification fetchSpec = new EOFetchSpecification(entityName, qualifier, null);
        NSArray results = editingContext.objectsWithFetchSpecification(fetchSpec);
        if( results.count() > 1)
        {
          throw new MoreThanOneException("objectMatchingValueForKeyEntityNamed: Matched more than one object with " +qualifier);
        }
View Full Code Here

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

  public EOFetchSpecsLabelProvider(String tableName) {
    super(tableName);
  }

  public Image getColumnImage(Object _element, String _property) {
    EOFetchSpecification fetchSpec = (EOFetchSpecification) _element;
    Image image;
    if (EOFetchSpecification.SHARES_OBJECTS.equals(_property)) {
      image = yesNoImage(fetchSpec.isSharesObjects(), Activator.getDefault().getImageRegistry().get(Activator.CHECK_ICON), null, null);
    } else {
      image = super.getColumnImage(_element, _property);
    }
    return image;
  }
View Full Code Here

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

  protected class FetchSpecChangeListener implements PropertyChangeListener {
    public void propertyChange(PropertyChangeEvent _event) {
      String propertyName = _event.getPropertyName();
      if (EOEntity.FETCH_SPECIFICATION == propertyName) {
        EOFetchSpecification fetchSpec = (EOFetchSpecification) _event.getNewValue();
        EOEntitySharedObjectsEditorSection.this.fetchSpecChanged(fetchSpec);

      } else if (EOEntity.FETCH_SPECIFICATIONS == propertyName) {
        EOEntitySharedObjectsEditorSection.this.fetchSpecsChanged();
      }
View Full Code Here

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

      text = relationshipPath.getChildRelationship().getName();
    } else if (_element instanceof EOAttributePath) {
      EOAttributePath attributePath = (EOAttributePath) _element;
      text = attributePath.getChildAttribute().getName();
    } else if (_element instanceof EOFetchSpecification) {
      EOFetchSpecification fetchSpec = (EOFetchSpecification) _element;
      text = fetchSpec.getName();
    } else if (_element instanceof EOArgument) {
      EOArgument argument = (EOArgument) _element;
      text = argument.getName();
    } else if (_element instanceof EOStoredProcedure) {
      EOStoredProcedure storedProcedure = (EOStoredProcedure) _element;
View Full Code Here

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

            EORelationship selectedRelationship = (EORelationship) selectedObject;
            setSelectedEntity(selectedRelationship.getEntity());
            getEntityEditor().setSelection(selection);
            setActivePage(getPageNum(EOModelEditor.EOENTITY_PAGE));
          } else if (selectedObject instanceof EOFetchSpecification) {
            EOFetchSpecification selectedFetchSpec = (EOFetchSpecification) selectedObject;
            setSelectedEntity(selectedFetchSpec.getEntity());
            getEntityEditor().setSelection(selection);
            // setActivePage(EOModelEditor.EOENTITY_PAGE);
          } else if (selectedObject instanceof AbstractEOAttributePath) {
            AbstractEOAttributePath selectedAttributePath = (AbstractEOAttributePath) selectedObject;
            setSelectedEntity(selectedAttributePath.getChildIEOAttribute().getEntity());
View Full Code Here

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

import org.eclipse.jface.viewers.Viewer;
import org.objectstyle.wolips.eomodeler.core.model.EOFetchSpecification;

public class EOSortOrderingsContentProvider implements IStructuredContentProvider {
  public Object[] getElements(Object _inputElement) {
    EOFetchSpecification fetchSpec = (EOFetchSpecification) _inputElement;
    Object[] sortOrderings = fetchSpec.getSortOrderings().toArray();
    return sortOrderings;
  }
View Full Code Here

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

  }

  public void setFetchSpecName(final String fetchSpec) {
    String _fetchSpec = fetchSpec;
    String oldFetchSpecName = getFetchSpecName();
    EOFetchSpecification myFetchSpec = null;

    if (fetchSpec != null && _entity != null) {
      myFetchSpec = _entity.getFetchSpecNamed(fetchSpec);
    }

    if (myFetchSpec != null) {
      _databaseDataSource.setFetchSpecification(myFetchSpec);
    }
    else {
      EOFetchSpecification newFetchSpec = new EOFetchSpecification(null);
      newFetchSpec.setEntity(_entity);
      newFetchSpec.setDeep(true);
      _databaseDataSource.setFetchSpecification(newFetchSpec);
    }

    if (fetchSpec == null && getFetchSpecList() != null) {
      _fetchSpec = FETCH_SPEC_NONE;
View Full Code Here

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

      text = relationshipPath.getChildRelationship().getName();
    } else if (_element instanceof EOAttributePath) {
      EOAttributePath attributePath = (EOAttributePath) _element;
      text = attributePath.getChildAttribute().getName();
    } else if (_element instanceof EOFetchSpecification) {
      EOFetchSpecification fetchSpec = (EOFetchSpecification) _element;
      text = fetchSpec.getName();
    } else if (_element instanceof EOArgument) {
      EOArgument argument = (EOArgument) _element;
      text = argument.getName();
    } else if (_element instanceof EOStoredProcedure) {
      EOStoredProcedure storedProcedure = (EOStoredProcedure) _element;
View Full Code Here

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

import org.eclipse.jface.viewers.Viewer;
import org.objectstyle.wolips.eomodeler.core.model.EOFetchSpecification;

public class PrefetchingKeyPathsContentProvider implements IStructuredContentProvider {
  public Object[] getElements(Object _inputElement) {
    EOFetchSpecification fetchSpec = (EOFetchSpecification) _inputElement;
    Collection<String> prefetchingRelationshipKeyPathsSet = fetchSpec.getPrefetchingRelationshipKeyPaths();
    Object[] prefetchingKeyPaths;
    if (prefetchingRelationshipKeyPathsSet == null) {
      prefetchingKeyPaths = new Object[0];
    } else {
      prefetchingKeyPaths = prefetchingRelationshipKeyPathsSet.toArray();
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.