Clover coverage report - Code Coverage for tapestry-contrib release 4.0-alpha-3
Coverage timestamp: Mon May 16 2005 09:12:41 EDT
file stats: LOC: 69   Methods: 3
NCLOC: 34   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
SimpleTableSessionStateManager.java 0% 0% 0% 0%
coverage
 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.ITableColumnModel;
 20   
 import org.apache.tapestry.contrib.table.model.ITableDataModel;
 21   
 import org.apache.tapestry.contrib.table.model.ITableModel;
 22   
 import org.apache.tapestry.contrib.table.model.ITableSessionStateManager;
 23   
 
 24   
 /**
 25   
  * A {@link org.apache.tapestry.contrib.table.model.ITableSessionStateManager} 
 26   
  * implementation that saves only the paging and sorting state of the table model 
 27   
  * into the session.
 28   
  * 
 29   
  * @author mindbridge
 30   
  */
 31   
 public class SimpleTableSessionStateManager
 32   
     implements ITableSessionStateManager
 33   
 {
 34   
     private ITableDataModel m_objDataModel;
 35   
     private ITableColumnModel m_objColumnModel;
 36   
 
 37  0
     public SimpleTableSessionStateManager(
 38   
         ITableDataModel objDataModel,
 39   
         ITableColumnModel objColumnModel)
 40   
     {
 41  0
         m_objDataModel = objDataModel;
 42  0
         m_objColumnModel = objColumnModel;
 43   
     }
 44   
 
 45   
     /**
 46   
      * @see org.apache.tapestry.contrib.table.model.ITableSessionStateManager#getSessionState(ITableModel)
 47   
      */
 48  0
     public Serializable getSessionState(ITableModel objModel)
 49   
     {
 50  0
         SimpleTableModel objSimpleModel = (SimpleTableModel) objModel;
 51  0
         return objSimpleModel.getState();
 52   
     }
 53   
 
 54   
     /**
 55   
      * @see org.apache.tapestry.contrib.table.model.ITableSessionStateManager#recreateTableModel(Serializable)
 56   
      */
 57  0
     public ITableModel recreateTableModel(Serializable objState)
 58   
     {
 59  0
         if (objState == null)
 60  0
             return null;
 61  0
         SimpleTableState objSimpleState = (SimpleTableState) objState;
 62  0
         return new SimpleTableModel(
 63   
             m_objDataModel,
 64   
             m_objColumnModel,
 65   
             objSimpleState);
 66   
     }
 67   
 
 68   
 }
 69