Coverage Report - org.apache.tapestry.contrib.table.model.simple.SimpleTableSortingState
 
Classes in this File Line Coverage Branch Coverage Complexity
SimpleTableSortingState
0%
0/11
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.ITableSortingState;
 20  
 
 21  
 /**
 22  
  * A minimal implementation of
 23  
  * {@link org.apache.tapestry.contrib.table.model.ITableSortingState}.
 24  
  * 
 25  
  * @author mindbridge
 26  
  */
 27  
 public class SimpleTableSortingState implements ITableSortingState,
 28  
         Serializable
 29  
 {
 30  
 
 31  
     private static final long serialVersionUID = 1L;
 32  
 
 33  
     private String m_strSortColumn;
 34  
     private boolean m_bSortOrder;
 35  
 
 36  
     public SimpleTableSortingState()
 37  
     {
 38  0
         this(null, ITableSortingState.SORT_ASCENDING);
 39  0
     }
 40  
 
 41  
     public SimpleTableSortingState(String strSortColumn, boolean bSortOrder)
 42  0
     {
 43  0
         m_strSortColumn = strSortColumn;
 44  0
         m_bSortOrder = bSortOrder;
 45  0
     }
 46  
 
 47  
     /**
 48  
      * Returns the SortOrder.
 49  
      * 
 50  
      * @return boolean
 51  
      */
 52  
     public boolean getSortOrder()
 53  
     {
 54  0
         return m_bSortOrder;
 55  
     }
 56  
 
 57  
     /**
 58  
      * Returns the SortColumn.
 59  
      * 
 60  
      * @return int
 61  
      */
 62  
     public String getSortColumn()
 63  
     {
 64  0
         return m_strSortColumn;
 65  
     }
 66  
 
 67  
     /**
 68  
      * Sets the SortColumn.
 69  
      * 
 70  
      * @param strSortColumn
 71  
      *            The SortColumn to set
 72  
      */
 73  
     public void setSortColumn(String strSortColumn, boolean bSortOrder)
 74  
     {
 75  0
         m_strSortColumn = strSortColumn;
 76  0
         m_bSortOrder = bSortOrder;
 77  0
     }
 78  
 
 79  
 }