com.neatech.climbplan.userinterface.models
Class Model
java.lang.Object
com.neatech.climbplan.userinterface.models.Model
public class Model
- extends Object
Constructor Summary |
private |
Model()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ADMIN_USER_NAME
private static final String ADMIN_USER_NAME
- See Also:
- Constant Field Values
model
private static Model model
database
private Database database
mountaineersModel
private MountaineersModel mountaineersModel
teamsModel
private TeamsModel teamsModel
mapsModel
private MapsModel mapsModel
activitiesModel
private ActivitiesModel activitiesModel
organizer
private OrganizerModel organizer
Model
private Model()
getInstance
public static Model getInstance()
loginOrganizer
public boolean loginOrganizer(String userName,
String passwd)
throws DatabaseException
- Throws:
DatabaseException
logoutOrganizer
public void logoutOrganizer()
changePassword
public void changePassword(String password,
String confirmPassword)
throws UserManagementException,
DatabaseException
- Throws:
UserManagementException
DatabaseException
setPassword
public void setPassword(String password,
String confirmPassword)
throws UserManagementException,
DatabaseException
- Throws:
UserManagementException
DatabaseException
checkPasswords
private void checkPasswords(String password,
String confirmPassword)
throws UserManagementException,
DatabaseException
- Throws:
UserManagementException
DatabaseException
getOrganizer
public OrganizerModel getOrganizer()
isLoggedIn
public boolean isLoggedIn()
isAdminLoggedIn
public boolean isAdminLoggedIn()
getMountaineersModel
public MountaineersModel getMountaineersModel(boolean refresh)
throws DatabaseException
- Throws:
DatabaseException
getAllMountaineers
private List<MountaineerModel> getAllMountaineers()
throws DatabaseException
- Throws:
DatabaseException
insertMountaineer
public void insertMountaineer(MountaineerModel mountaineer)
throws DatabaseException
- Throws:
DatabaseException
deleteMountaineer
public void deleteMountaineer(MountaineerModel mountaineer)
throws DatabaseException
- Throws:
DatabaseException
updateMountaineer
public void updateMountaineer(MountaineerModel mountaineer)
throws DatabaseException
- Throws:
DatabaseException
insertOrganizer
public void insertOrganizer(OrganizerModel organizer)
throws DatabaseException
- Throws:
DatabaseException
deleteOrganizer
public void deleteOrganizer(OrganizerModel organizer)
throws DatabaseException
- Throws:
DatabaseException
updateOrganizer
public void updateOrganizer(OrganizerModel organizer)
throws DatabaseException
- Throws:
DatabaseException
getTeamsModel
public TeamsModel getTeamsModel(boolean refresh)
throws DatabaseException
- Throws:
DatabaseException
getAllTeams
private List<TeamModel> getAllTeams()
throws DatabaseException
- Throws:
DatabaseException
insertTeam
public void insertTeam(TeamModel team)
throws DatabaseException
- Throws:
DatabaseException
deleteTeam
public void deleteTeam(TeamModel team)
throws DatabaseException
- Throws:
DatabaseException
updateTeam
public void updateTeam(TeamModel team)
throws DatabaseException
- Throws:
DatabaseException
addMountaineerToTeam
public void addMountaineerToTeam(TeamModel team,
MountaineerModel mountaineer)
throws DatabaseException
- Throws:
DatabaseException
deleteMountaineerFromTeam
public void deleteMountaineerFromTeam(TeamModel team,
MountaineerModel mountaineer)
throws DatabaseException
- Throws:
DatabaseException
getMapsModel
public MapsModel getMapsModel(boolean refresh)
throws DatabaseException
- Throws:
DatabaseException
getAllMaps
private List<MapModel> getAllMaps()
throws DatabaseException
- Throws:
DatabaseException
insertMap
public void insertMap(MapModel map)
throws DatabaseException
- Throws:
DatabaseException
deleteMap
public void deleteMap(MapModel map)
throws DatabaseException
- Throws:
DatabaseException
updateMap
public void updateMap(MapModel map)
throws DatabaseException
- Throws:
DatabaseException
getActivitiesModel
public ActivitiesModel getActivitiesModel()
getAllActivities
private List<ActivityModel> getAllActivities()
insertActivity
public void insertActivity(ActivityModel activity)
deleteActivity
public void deleteActivity(ActivityModel activity)
updateActivity
public void updateActivity(ActivityModel activity)