rsvp.model
Interface EventDBInterface

All Known Implementing Classes:
EventDB

public interface EventDBInterface


Field Summary
static long serialVersionUID
           
 
Method Summary
 int addEmptyEvent()
          Creates a new, empty Event, adds it to this database, and returns its event ID.
 EventInterface getEvent(int id)
          Returns the event with a given ID.
 int getEventCount()
          Returns the event count for this database.
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values
Method Detail

addEmptyEvent

int addEmptyEvent()
Creates a new, empty Event, adds it to this database, and returns its event ID.

Returns:
the event ID of the newly-added Event.

getEvent

EventInterface getEvent(int id)
Returns the event with a given ID. Throws a BogusParameterException if id is an invalid event ID for this database.

Precondition: 0 <= id < this.getEventCount()

Parameters:
id - an integer between 0 (inclusive) and this.getEventCount() (exclusive)
Returns:

getEventCount

int getEventCount()
Returns the event count for this database. If this value is greater than one, then the maximum valid event ID is one less than it. (If this value is zero, there are no valid event IDs.)

Returns:
the event count.