| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Database
| Method Summary | |
|---|---|
|  void | addMountaineerToTeam(TeamModel team,
                     MountaineerModel mountaineer)This method adds a mountaineer to a team. | 
|  void | changePassword(OrganizerModel organizer,
               String password)This method changes the password of an organizer. | 
|  OrganizerModel | checkAuthorization(String userName,
                   String passwd)This method checks whether a supplied user name and password belongs to an organizer | 
|  void | deleteMap(MapModel map)This method deletes a MapModelfrom the database. | 
|  void | deleteMountaineer(MountaineerModel mountaineer)This method deletes a MountaineerModelfrom the database. | 
|  void | deleteMountaineerFromTeam(TeamModel team,
                          MountaineerModel mountaineer)This method deletes a mountaineer from a team. | 
|  void | deleteOrganizer(OrganizerModel organizer)This method deletes a OrganizerModelfrom the database. | 
|  void | deleteTeam(TeamModel team)This method deletes a TeamModelfrom the database. | 
|  void | getAllMaps(List<MapModel> maps)This method returns all the maps stored in the database as a list of MapModelby filling the
 list ofMapModelgiven as a parameter. | 
|  void | getAllMountaineers(List<MountaineerModel> mountaineers)This method returns all the mountaineers stored in the database in a single list by filling the list of MountaineerModelgiven as a parameter. | 
|  void | getAllOrganizers(List<MountaineerModel> mountaineers)This method returns all the organizers stored in the database in a single list by filling the list of MountaineerModelgiven as a parameter. | 
|  void | getAllTeams(List<TeamModel> teams,
            List<MountaineerModel> mountaineers)This methods returns all the teams stored in the database as a list of TeamModelby filling the
 list ofTeamModelgiven as a parameter. | 
|  void | insertMap(MapModel map)This method inserts a MapModelto
 the database by filling the given list ofMapModelas a parameter. | 
|  void | insertMountaineer(MountaineerModel mountaineer)This method inserts a MountaineerModelto
 the database. | 
|  void | insertOrganizer(OrganizerModel organizer)This method inserts a OrganizerModelto
 the database. | 
|  void | insertTeam(TeamModel team)This method inserts a TeamModelto
 the database. | 
|  void | updateMap(MapModel map)This method updates a MapModelby storing the data to the database if necessary. | 
|  void | updateMountaineer(MountaineerModel mountaineer)This method updates a MountaineerModelby storing the data to the database if necessary. | 
|  void | updateOrganizer(OrganizerModel organizer)This method updates a OrganizerModelby storing the data to the database if necessary. | 
|  void | updateTeam(TeamModel team)This method updates a TeamModelby storing the data to the database if necessary. | 
| Method Detail | 
|---|
OrganizerModel checkAuthorization(String userName,
                                  String passwd)
                                  throws DatabaseException
userName - of the organizerpasswd - of the organizer
DatabaseException
void changePassword(OrganizerModel organizer,
                    String password)
                    throws DatabaseException
organizer - whose password is to be changedpassword - new password to be set
DatabaseException
void getAllMountaineers(List<MountaineerModel> mountaineers)
                        throws DatabaseException
MountaineerModel given as a parameter.
mountaineers - a list of MountaineerModel
                     to be filled
DatabaseException
void insertMountaineer(MountaineerModel mountaineer)
                       throws DatabaseException
MountaineerModel to
 the database.
mountaineer - a MountaineerModel
                    to insert to the database
DatabaseException
void updateMountaineer(MountaineerModel mountaineer)
                       throws DatabaseException
MountaineerModel
 by storing the data to the database if necessary.
mountaineer - a MountaineerModel
                    to update to the database
DatabaseException
void deleteMountaineer(MountaineerModel mountaineer)
                       throws DatabaseException
MountaineerModel
 from the database.
mountaineer - a MountaineerModel
                    to delete from the database
DatabaseException
void getAllOrganizers(List<MountaineerModel> mountaineers)
                      throws DatabaseException
MountaineerModel given as a parameter.
 Note: OrganizerModel must be cast to
 MountaineerModel and added to the list.
mountaineers - a list of MountaineerModel
                     to be filled
DatabaseException
void insertOrganizer(OrganizerModel organizer)
                     throws DatabaseException
OrganizerModel to
 the database.
organizer - a OrganizerModel
                  to insert to the database
DatabaseException
void updateOrganizer(OrganizerModel organizer)
                     throws DatabaseException
OrganizerModel
 by storing the data to the database if necessary.
organizer - a OrganizerModel
                  to update to the database
DatabaseException
void deleteOrganizer(OrganizerModel organizer)
                     throws DatabaseException
OrganizerModel
 from the database.
organizer - a OrganizerModel
                  to delete from the database
DatabaseException
void getAllTeams(List<TeamModel> teams,
                 List<MountaineerModel> mountaineers)
                 throws DatabaseException
TeamModel by filling the
 list of TeamModel given as a parameter.
 TeamModel contains a list of 
 MountaineerModel; this list must be filled
 from the given parameter, list of MountaineerModel.
 The following procedure may be implemented (pseudo-code):
 
 For each mountaineerId in TeamModel team
     // find the index of the mountaineer
     // having id = mountaineerId from mountaineers
     index = mountaineers.indexOf(mountaineerId);
     teams.mountaineers.add(mountaineers.get(index));
 
teams - a list of TeamModel to be filledmountaineers - the mountaineer models to be used
DatabaseException
void insertTeam(TeamModel team)
                throws DatabaseException
TeamModel to
 the database.
team - a TeamModel
             to insert to the database
DatabaseException
void updateTeam(TeamModel team)
                throws DatabaseException
TeamModel
 by storing the data to the database if necessary.
team - a TeamModel
             to update from the database
DatabaseException
void deleteTeam(TeamModel team)
                throws DatabaseException
TeamModel
 from the database.
team - a TeamModel
             to delete from the database
DatabaseException
void addMountaineerToTeam(TeamModel team,
                          MountaineerModel mountaineer)
                          throws DatabaseException
team - a TeamModel to add tomountaineer - a MountaineerModel to add
DatabaseException
void deleteMountaineerFromTeam(TeamModel team,
                               MountaineerModel mountaineer)
                               throws DatabaseException
team - a TeamModel to delete frommountaineer - a MountaineerModel to delete
DatabaseException
void getAllMaps(List<MapModel> maps)
                throws DatabaseException
MapModel by filling the
 list of MapModel given as a parameter.
maps - a list of MapModel to be filled
DatabaseException
void insertMap(MapModel map)
               throws DatabaseException
MapModel to
 the database by filling the given list of
 MapModel as a parameter.
team - a MapModel
             to insert to the databasemap - 
DatabaseException
void updateMap(MapModel map)
               throws DatabaseException
MapModel
 by storing the data to the database if necessary.
map - a MapModel
             to update from the database
DatabaseException
void deleteMap(MapModel map)
               throws DatabaseException
MapModel
 from the database.
map - a MapModel
             to delete from the database
DatabaseException| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||