public class ScheduleDBDAO extends ScheduleDAO
The statements to create the tables are now in scripts/sql/createfullhddb.sql and scripts/sql/createfullhddb.mysql.
Modifier | Constructor and Description |
---|---|
protected |
ScheduleDBDAO()
Constructor for this class, that only checks that the schedules table has the expected version.
|
Modifier and Type | Method and Description |
---|---|
void |
create(Schedule schedule)
Create a new schedule.
|
boolean |
exists(String scheduleName)
Returns whether a named schedule exists.
|
Iterator<Schedule> |
getAllSchedules()
Get iterator to all available schedules.
|
int |
getCountSchedules()
Get the number of defined schedules.
|
Schedule |
read(String scheduleName)
Read an existing schedule.
|
void |
update(Schedule schedule)
Update a schedule in the DAO.
|
getInstance, iterator
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
protected ScheduleDBDAO()
public void create(Schedule schedule)
create
in class ScheduleDAO
schedule
- The schedule to createArgumentNotValid
- if schedule is nullPermissionDenied
- if a schedule already existspublic boolean exists(String scheduleName)
exists
in class ScheduleDAO
scheduleName
- The name of a scheduleArgumentNotValid
- if the schedulename is null or emptypublic Schedule read(String scheduleName)
read
in class ScheduleDAO
scheduleName
- the name of the scheduleArgumentNotValid
- if schedulename is null or emptyUnknownID
- if the schedule doesn't existpublic void update(Schedule schedule)
update
in class ScheduleDAO
schedule
- The schedule to updateArgumentNotValid
- If the schedule is nullUnknownID
- If the schedule doesn't exist in the DAOPermissionDenied
- If the edition of the schedule to update is older than the DAO'spublic Iterator<Schedule> getAllSchedules()
getAllSchedules
in class ScheduleDAO
public int getCountSchedules()
ScheduleDAO
getCountSchedules
in class ScheduleDAO
Copyright © 2005–2015 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.