CLRA 0.1.2

com.clra.web
Class SessionView

java.lang.Object
  |
  +--com.clra.web.SessionView
All Implemented Interfaces:
Comparable, Serializable

public class SessionView
extends Object
implements Comparable, Serializable

Read-only information about a session. A thin-wrapper around RowingSessionSnapshot, with some String properties useful in JSP's.

Version:
$Id: SessionView.java,v 1.2 2002/02/18 18:07:20 rphall Exp $
Author:
Rick Hall
See Also:
Serialized Form

Constructor Summary
SessionView()
          Constructs an invalid instance.
SessionView(RowingSessionSnapshot rss)
           
 
Method Summary
 int compareTo(Object o)
          Orders views by the natural comparator for rowing sessions.
 boolean equals(Object o)
          Two sessions are equal iff they their natural comparator returns equal
 RowingSessionSnapshot getData()
           
 Date getDate()
           
 String getDateAsString()
          Returns the date as a formatted string, using the current format
 String getDateFormatSpec()
          Returns the specification for the rowing date is formatted as a string.
 Integer getId()
           
 String getLevel()
           
 String getState()
           
 String getType()
           
 int hashCode()
          Session objects are hashed by id's
 void setData(RowingSessionSnapshot rss)
          Deprecated
 void setDateFormatSpec(String spec)
          Specifies how the date should be formatted as a string.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionView

public SessionView()
Constructs an invalid instance. Use this constructor only for JSP beans and immediately set valid values via setValuesFromRowingSession(..).

SessionView

public SessionView(RowingSessionSnapshot rss)
Method Detail

setData

public void setData(RowingSessionSnapshot rss)
Deprecated

getData

public RowingSessionSnapshot getData()

getId

public Integer getId()

getDate

public Date getDate()

setDateFormatSpec

public void setDateFormatSpec(String spec)
Specifies how the date should be formatted as a string. The SimpleDateFormat class spells out how formats are specified.
See Also:
SimpleDateFormat

getDateFormatSpec

public String getDateFormatSpec()
Returns the specification for the rowing date is formatted as a string. The SimpleDateFormat class spells out how formats are specified.
See Also:
SimpleDateFormat

getDateAsString

public String getDateAsString()
Returns the date as a formatted string, using the current format

getLevel

public String getLevel()

getType

public String getType()

getState

public String getState()

equals

public boolean equals(Object o)
Two sessions are equal iff they their natural comparator returns equal
Overrides:
equals in class Object

hashCode

public int hashCode()
Session objects are hashed by id's
Overrides:
hashCode in class Object

compareTo

public int compareTo(Object o)
              throws ClassCastException
Orders views by the natural comparator for rowing sessions.
Specified by:
compareTo in interface Comparable
Parameters:
o - A session object.
Throws:
ClassCastException - if o is not a session object.

CLRA 0.1.2