Package com.webobjects.eocontrol

Examples of com.webobjects.eocontrol.EOFetchSpecification.sortOrderings()


      // In addition, we need to refetch if we use a batching display
      // group, as the sort ordering is
      // always applied from the DB.
      if ((sortOrderings != null) && (ds instanceof EODatabaseDataSource)) {
        EOFetchSpecification fs = ((EODatabaseDataSource) ds).fetchSpecification();
        if (!fs.sortOrderings().equals(sortOrderings) && (fs.fetchLimit() != 0 || useBatchingDisplayGroup())) {
          fs.setSortOrderings(sortOrderings);
          _hasToUpdate = _hasToUpdate ? true : alwaysRefetchList();
        }
      }
      // this will have the side effect of resetting the batch # to sth
View Full Code Here


    }

    NSArray<NSDictionary> rawRows = ERXEOAccessUtilities.rawRowsForSQLExpression(editingContext, _entity.model(), sqlExpression, sqlHelper.attributesToFetchForEntity(fetchSpec, _entity));
    NSArray<T> objs;
    objs = ERXEOControlUtilities.faultsForRawRowsFromEntity(editingContext, rawRows, _entity.name());
    objs = ERXEOControlUtilities.objectsForFaultWithSortOrderings(editingContext, objs, fetchSpec.sortOrderings());
    return objs;
  }

  /**
   * Remove all of the tags from instances of this entity type.
View Full Code Here

   
    for (String  keyPath : fetchSpec.prefetchingRelationshipKeyPaths()) {
      query.addPrefetch(keyPath);
    }
   
    for (EOSortOrdering sortOrdering : fetchSpec.sortOrderings()) {
      SortOrder order = SortOrder.ASCENDING;
      if (sortOrdering.selector().equals(EOSortOrdering.CompareCaseInsensitiveAscending)) {
        order = SortOrder.ASCENDING_INSENSITIVE;
      } else if (sortOrdering.selector().equals(EOSortOrdering.CompareCaseInsensitiveDescending)) {
        order = SortOrder.DESCENDING_INSENSITIVE;
View Full Code Here

        if ((qualifier = spec.qualifier()) != null) {
            result = EOQualifier.filteredArrayWithQualifier(result, qualifier);
        }

        if ((sortOrderings = spec.sortOrderings()) != null) {
            result = EOSortOrdering.sortedArrayUsingKeyOrderArray(result,sortOrderings);
        }

        return result;
    }
View Full Code Here

   * @return the fetch specification
   */
  protected EOFetchSpecification fetchSpecification() {
    EODatabaseDataSource ds = (EODatabaseDataSource) dataSource();
    EOFetchSpecification spec = (EOFetchSpecification) ds.fetchSpecificationForFetch().clone();
    spec.setSortOrderings(ERXArrayUtilities.arrayByAddingObjectsFromArrayWithoutDuplicates(sortOrderings(), spec.sortOrderings()));
    EOQualifier dgQualifier = qualifier();
    EOQualifier qualifier = spec.qualifier();
    if (dgQualifier != null) {
      if (qualifier != null) {
        qualifier = new ERXAndQualifier(dgQualifier, qualifier);
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.