Package com.draagon.meta.manager.exp

Examples of com.draagon.meta.manager.exp.Range


    return mOrder;
  }

  public void setRange( int start, int end )
  {
    mRange = new Range( start, end );
  }
View Full Code Here



        // Handle Expressions, Sorting, Ranging, and Options
        Expression exp = options.getExpression();
        SortOrder sort = options.getSortOrder();
        Range range = options.getRange();

        if ( exp != null )
            results = filterObjects( results, exp );

        if ( sort != null )
View Full Code Here

    try {
      ResultSet rs = s.executeQuery();

      // If the range is not supported in the query, then we need to do it manually
      Range range = null;
      if ( !supportsRangeInQuery() ) options.getRange();
     
      int index = 1;

      try {
        while (rs.next()) {
          if (range == null
              || (index >= range.getStart() && index <= range
                  .getEnd())) {
            // Get a new Object
            Object o = getManager().getNewObject(mc);

            // Parse the Object
View Full Code Here

    if (options.withLock()) {
      query.append(" ").append(getLockString());
    }
   
    // Add on the range
    Range range = options.getRange();
    if ( supportsRangeInQuery() && options.getRange() != null
        && range.getStart() > 0 && range.getEnd() > 0 ) {
     
      if ( range.getStart() > range.getEnd() ) {
        throw new IllegalArgumentException( "The range end (" + range.getEnd() + ") cannot be greater than the start value (" + range.getStart() + ")" );
      }
     
      query.append( " " ).append( getRangeString( range ));
    }
View Full Code Here

TOP

Related Classes of com.draagon.meta.manager.exp.Range

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.