org.hackystat.projectbrowser.page.sensordata
Class SensorDataTableModel

java.lang.Object
  extended by org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider
      extended by org.hackystat.projectbrowser.page.sensordata.SensorDataTableModel
All Implemented Interfaces:
java.io.Serializable, org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator, org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider, org.apache.wicket.IClusterable, org.apache.wicket.markup.repeater.data.IDataProvider, org.apache.wicket.model.IDetachable

public class SensorDataTableModel
extends org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider

Provides a model that summarizes for each day in a month, how many sensor data instances of a given type were associated with that day.

Author:
Philip Johnson
See Also:
Serialized Form

Constructor Summary
SensorDataTableModel()
          Default constructor.
 
Method Summary
 void detach()
          Does nothing at the moment.
 java.util.Set<java.lang.String> getSdtSet()
          Gets a set of strings containing the name of all Sdts sent during this month.
 boolean isEmpty()
          True if this model contains no data.
 java.util.Iterator iterator(int first, int count)
          Returns an iterator over the rows in this model.
 org.apache.wicket.model.IModel model(java.lang.Object obj)
          The model associated with a row in this table.
 void setModel(org.hackystat.sensorbase.resource.projects.jaxb.MultiDayProjectSummary multiDaySummary, org.hackystat.sensorbase.resource.projects.jaxb.Project project)
          Used to set up the model.
 int size()
          The total number of rows in this table.
 
Methods inherited from class org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider
getSort, getSortState, setSort, setSort, setSortState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SensorDataTableModel

public SensorDataTableModel()
Default constructor.

Method Detail

setModel

public void setModel(org.hackystat.sensorbase.resource.projects.jaxb.MultiDayProjectSummary multiDaySummary,
                     org.hackystat.sensorbase.resource.projects.jaxb.Project project)
Used to set up the model.

Parameters:
multiDaySummary - The multidayprojrectsummary instance.
project - The project.

getSdtSet

public java.util.Set<java.lang.String> getSdtSet()
Gets a set of strings containing the name of all Sdts sent during this month.

Returns:
The set of all SDT names.

iterator

public java.util.Iterator iterator(int first,
                                   int count)
Returns an iterator over the rows in this model.

Parameters:
first - The first element in the iterator. (Ignored)
count - The total number of instances. (Ignored)
Returns:
The iterator.

model

public org.apache.wicket.model.IModel model(java.lang.Object obj)
The model associated with a row in this table.

Parameters:
obj - The SensorDataTableRowModel.
Returns:
The model.

size

public int size()
The total number of rows in this table.

Returns:
The total number of rows.

detach

public void detach()
Does nothing at the moment.

Specified by:
detach in interface org.apache.wicket.model.IDetachable
Overrides:
detach in class org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider

isEmpty

public boolean isEmpty()
True if this model contains no data.

Returns:
True if this model has no data.