|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.harvester.datamodel.ScheduleDAO dk.netarkivet.harvester.datamodel.ScheduleDBDAO
public class ScheduleDBDAO
A database-based implementation of the ScheduleDAO. The statements to create the tables are now in scripts/sql/createfullhddb.sql and scripts/sql/createfullhddb.mysql.
Constructor Summary | |
---|---|
protected |
ScheduleDBDAO()
Constructor for this class, that only checks that the schedules table has the expected version (1). |
Method Summary | |
---|---|
void |
create(Schedule schedule)
Create a new schedule. |
boolean |
exists(java.lang.String scheduleName)
Returns whether a named schedule exists. |
java.util.Iterator<Schedule> |
getAllSchedules()
Get iterator to all available schedules. |
int |
getCountSchedules()
Get the number of defined schedules. |
Schedule |
read(java.lang.String scheduleName)
Read an existing schedule. |
void |
update(Schedule schedule)
Update a schedule in the DAO. |
Methods inherited from class dk.netarkivet.harvester.datamodel.ScheduleDAO |
---|
getInstance, iterator, reset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ScheduleDBDAO()
Method Detail |
---|
public void create(Schedule schedule)
create
in class ScheduleDAO
schedule
- The schedule to create
ArgumentNotValid
- if schedule is null
PermissionDenied
- if a schedule already existspublic boolean exists(java.lang.String scheduleName)
exists
in class ScheduleDAO
scheduleName
- The name of a schedule
ArgumentNotValid
- if the schedulename is null or emptypublic Schedule read(java.lang.String scheduleName)
read
in class ScheduleDAO
scheduleName
- the name of the schedule
ArgumentNotValid
- if schedulename is null or empty
UnknownID
- if the schedule doesn't existpublic void update(Schedule schedule)
update
in class ScheduleDAO
schedule
- The schedule to update
ArgumentNotValid
- If the schedule is null
UnknownID
- If the schedule doesn't exist in the DAO
PermissionDenied
- If the edition of the schedule to update is
older than the DAO'spublic java.util.Iterator<Schedule> getAllSchedules()
getAllSchedules
in class ScheduleDAO
public int getCountSchedules()
ScheduleDAO
getCountSchedules
in class ScheduleDAO
ScheduleDAO.getCountSchedules()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |