Coverage Report - org.apache.tapestry.contrib.table.model.simple.SimpleTableState
 
Classes in this File Line Coverage Branch Coverage Complexity
SimpleTableState
0%
0/10
N/A
1
 
 1  
 // Copyright 2004, 2005 The Apache Software Foundation
 2  
 //
 3  
 // Licensed under the Apache License, Version 2.0 (the "License");
 4  
 // you may not use this file except in compliance with the License.
 5  
 // You may obtain a copy of the License at
 6  
 //
 7  
 //     http://www.apache.org/licenses/LICENSE-2.0
 8  
 //
 9  
 // Unless required by applicable law or agreed to in writing, software
 10  
 // distributed under the License is distributed on an "AS IS" BASIS,
 11  
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12  
 // See the License for the specific language governing permissions and
 13  
 // limitations under the License.
 14  
 
 15  
 package org.apache.tapestry.contrib.table.model.simple;
 16  
 
 17  
 import java.io.Serializable;
 18  
 
 19  
 import org.apache.tapestry.contrib.table.model.ITablePagingState;
 20  
 import org.apache.tapestry.contrib.table.model.ITableSortingState;
 21  
 
 22  
 /**
 23  
  * A container holding all of the table model states.
 24  
  * 
 25  
  * @author mindbridge
 26  
  */
 27  
 public class SimpleTableState implements Serializable
 28  
 {
 29  
 
 30  
     private static final long serialVersionUID = 1L;
 31  
 
 32  
     private ITablePagingState m_objPagingState;
 33  
     private ITableSortingState m_objSortingState;
 34  
 
 35  
     public SimpleTableState()
 36  
     {
 37  0
         this(new SimpleTablePagingState(), new SimpleTableSortingState());
 38  0
     }
 39  
 
 40  
     public SimpleTableState(ITablePagingState objPagingState,
 41  
             ITableSortingState objSortingState)
 42  0
     {
 43  0
         m_objPagingState = objPagingState;
 44  0
         m_objSortingState = objSortingState;
 45  0
     }
 46  
 
 47  
     public SimpleTableState(int nPageSize, int nCurrentPage,
 48  
             String strSortColumn, boolean bSortOrder)
 49  
     {
 50  0
         this(new SimpleTablePagingState(nPageSize, nCurrentPage),
 51  
                 new SimpleTableSortingState(strSortColumn, bSortOrder));
 52  0
     }
 53  
 
 54  
     /**
 55  
      * Returns the pagingState.
 56  
      * 
 57  
      * @return ITablePagingState
 58  
      */
 59  
     public ITablePagingState getPagingState()
 60  
     {
 61  0
         return m_objPagingState;
 62  
     }
 63  
 
 64  
     /**
 65  
      * Returns the sortingState.
 66  
      * 
 67  
      * @return ITableSortingState
 68  
      */
 69  
     public ITableSortingState getSortingState()
 70  
     {
 71  0
         return m_objSortingState;
 72  
     }
 73  
 
 74  
 }