eShopper
Class eShopperDate

java.lang.Object
  extended byeShopper.eShopperNode
      extended byeShopper.eShopperDate

public class eShopperDate
extends eShopperNode

This is a subclass of eShopperNode which represents a date node. A date node can have both recipes and ingredients as children.

Author:
Jim Laing

Constructor Summary
eShopperDate(java.sql.Date date, int listID, eShopperDB db)
          the constructor
 
Method Summary
 java.util.Vector getChildren()
          This returns the node's children.
 java.lang.String getDate()
          This returns the date associated with the node.
 java.lang.String getDBString()
          Gets a string representing the date, formatted to go in a database (e.g.
 int nodeID()
          This returns the nodeID of the node.
 java.lang.String toString()
          This is the overload of the toString function.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

eShopperDate

public eShopperDate(java.sql.Date date,
                    int listID,
                    eShopperDB db)
the constructor

Parameters:
date - a java.sql.date object
listID - the database ID of the list which the date is associated with
db - the database from which to build the node
Method Detail

getChildren

public java.util.Vector getChildren()
This returns the node's children.

Specified by:
getChildren in class eShopperNode
Returns:
The childen of the node

toString

public java.lang.String toString()
This is the overload of the toString function.

Specified by:
toString in class eShopperNode
Returns:
a string representation of the node

getDate

public java.lang.String getDate()
This returns the date associated with the node.

Specified by:
getDate in class eShopperNode
Returns:
a string representation of the date

nodeID

public int nodeID()
This returns the nodeID of the node.

Specified by:
nodeID in class eShopperNode
Returns:
always returns 0, which is the nodeID of any date

getDBString

public java.lang.String getDBString()
Gets a string representing the date, formatted to go in a database (e.g. '2004-07-04')

Returns:
the string representation of the date