Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.1-core
    • Fix Version/s: 2.1.0-core
    • Component/s: Infrastructure
    • Labels:
      None
    • Environment:
      environment independent.

      Description

      Add RowLimitMutator interface for cases where row limit can be mutated.

      package org.apache.myfaces.trinidad.model;

      /**

      • Identifies a collection whose row limit can be mutated.
        */
        public interface RowLimitMutator
        {
        /**
      • Mutate the row limit of this collection, it returns the old row limit.
      • @param newLimit the new limit of this collection to set to.
      • A positive number: the maximum number of rows the collection can hold.
      • CollectionModel.UNKNOWN_ROW_LIMIT: row limit is unknown.
      • CollectionModel.UNLIMITED_ROW: there is no limit
      • @returns the old row limit.
      • @throws IllegalArgumentException if <em>newLimit</em> is 0 or any negative number
      • other than CollectionModel.UNKNOWN_ROW_LIMIT and CollectionModel.UNLIMITED_ROW.
        */
        public int setRowLimit(int newLimit);
        }

      CollectionModel is updated to define the row limit constants, and also provides the default implementation of retrieving row limit method.

      /**

      • Gets the row limit of this collection model. Default is to return UNKNOWN_ROW_LIMIT.
      • Subclasses should override this method if row limit is enforced.
      • @return the maximum number of rows this collection can hold, possible return values are:
      • A positive number: the maximum number of rows the collection can hold
      • UNKNOWN_ROW_LIMIT: row limit is unknown.
      • UNLIMITED_ROW: there is no limit
        */
        public int getRowLimit() { return UNKNOWN_ROW_LIMIT; }

      public final static int UNLIMITED_ROW = -2;
      public final static int UNKNOWN_ROW_LIMIT = -1;

        Attachments

          Activity

            People

            • Assignee:
              gabrielle Gabrielle Crawford
              Reporter:
              jingwu Jing Wu
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified