babase.db
Class RankingIdentifier

java.lang.Object
  extended by babase.db.RankingIdentifier
Direct Known Subclasses:
RankingInfo

public class RankingIdentifier
extends java.lang.Object

RankingIdentifier uniquely identifies a "ranking" in Babase. This identifier can be used to retrieve or store a ranking in Babase. As an indentifer, instances of this class do not carry actual ranking contents (i.e., which individual is ranked at what position).

Author:
junyang

Field Summary
 java.util.Date endDate
          The ranking end date (inclusive).
 Group group
          The group that this ranking is for.
 RankType rankType
          The type of the ranking.
 java.util.Date startDate
          The ranking start date (inclusive).
 
Constructor Summary
RankingIdentifier(Group group, RankType rankType, java.util.Date startDate)
          A convenience constructor.
RankingIdentifier(Group group, RankType rankType, java.util.Date startDate, java.util.Date endDate)
          Constructor.
 
Method Summary
static RankingIdentifier fromXML(org.w3c.dom.Element e)
           
 java.lang.String toString()
           
 org.w3c.dom.Element toXML(org.w3c.dom.Document d)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

group

public final Group group
The group that this ranking is for.


rankType

public final RankType rankType
The type of the ranking.


startDate

public final java.util.Date startDate
The ranking start date (inclusive).


endDate

public final java.util.Date endDate
The ranking end date (inclusive).

Constructor Detail

RankingIdentifier

public RankingIdentifier(Group group,
                         RankType rankType,
                         java.util.Date startDate,
                         java.util.Date endDate)
Constructor.

Parameters:
group -
rankType -
startDate - Since Date is mutable, this constructor will a copy of the input object.
endDate - Since Date is mutable, this constructor will a copy of the input object.

RankingIdentifier

public RankingIdentifier(Group group,
                         RankType rankType,
                         java.util.Date startDate)
A convenience constructor. endDate will be automatically set to the last day of the month of startDate.

Parameters:
group -
rankType -
startDate - Since Date is mutable, this constructor will a copy of the input object.
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toXML

public org.w3c.dom.Element toXML(org.w3c.dom.Document d)

fromXML

public static RankingIdentifier fromXML(org.w3c.dom.Element e)
                                 throws Babase.LoadFromXMLException
Throws:
Babase.LoadFromXMLException