net.databinder.models
Class SublistProjectionModel.Chunked

java.lang.Object
  extended by org.apache.wicket.model.AbstractReadOnlyModel
      extended by org.apache.wicket.model.LoadableDetachableModel
          extended by net.databinder.models.SublistProjectionModel
              extended by net.databinder.models.SublistProjectionModel.Chunked
All Implemented Interfaces:
java.io.Serializable, org.apache.wicket.IClusterable, org.apache.wicket.model.IDetachable, org.apache.wicket.model.IModel
Direct Known Subclasses:
SublistProjectionModel.Transposed
Enclosing class:
SublistProjectionModel

public static class SublistProjectionModel.Chunked
extends SublistProjectionModel

Breaks the parent list into chunks of the requested size, in the same order as the parent list.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class net.databinder.models.SublistProjectionModel
SublistProjectionModel.Chunked, SublistProjectionModel.ProjectedSublist, SublistProjectionModel.Transposed
 
Field Summary
protected  int chunkSize
           
 
Constructor Summary
SublistProjectionModel.Chunked(int chunkSize, org.apache.wicket.model.IModel master)
           
 
Method Summary
protected  int getParentSize()
           
protected  int getSize(int parentIdx)
           
protected  int transform(int parentIdx, int sublistIdx)
           
 
Methods inherited from class net.databinder.models.SublistProjectionModel
getMasterList, load, onDetach
 
Methods inherited from class org.apache.wicket.model.LoadableDetachableModel
detach, getObject, isAttached, onAttach, toString
 
Methods inherited from class org.apache.wicket.model.AbstractReadOnlyModel
getObject, setObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

chunkSize

protected int chunkSize
Constructor Detail

SublistProjectionModel.Chunked

public SublistProjectionModel.Chunked(int chunkSize,
                                      org.apache.wicket.model.IModel master)
Method Detail

transform

protected int transform(int parentIdx,
                        int sublistIdx)
Specified by:
transform in class SublistProjectionModel
Returns:
index of master list mapped to parameters

getSize

protected int getSize(int parentIdx)
Specified by:
getSize in class SublistProjectionModel
Returns:
size sublist at given index

getParentSize

protected int getParentSize()
Specified by:
getParentSize in class SublistProjectionModel
Returns:
number of sublists


Copyright © 2005-2008 Nathan Hamblen. All Rights Reserved.