myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gabrielle Crawford (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Resolved] (TRINIDAD-2353) Add RowLimitMutator interface
Date Thu, 24 Jan 2013 23:11:13 GMT

     [ https://issues.apache.org/jira/browse/TRINIDAD-2353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gabrielle Crawford resolved TRINIDAD-2353.
------------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.0-core
         Assignee: Gabrielle Crawford

Completed: At revision: 1438257  

                
> Add RowLimitMutator interface
> -----------------------------
>
>                 Key: TRINIDAD-2353
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2353
>             Project: MyFaces Trinidad
>          Issue Type: Improvement
>          Components: Infrastructure
>    Affects Versions: 2.0.1-core
>         Environment: environment independent. 
>            Reporter: Jing Wu
>            Assignee: Gabrielle Crawford
>            Priority: Minor
>             Fix For: 2.1.0-core
>
>         Attachments: rowlimitmutator.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> 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;

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message