|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.harvester.datamodel.ScheduleDAO
public abstract class ScheduleDAO
A DAO for reading and writing schedules by name.
Constructor Summary | |
---|---|
protected |
ScheduleDAO()
Constructor made private to enforce singleton. |
Method Summary | |
---|---|
abstract void |
create(Schedule schedule)
Create a new schedule. |
abstract boolean |
exists(java.lang.String scheduleName)
Returns whether a named schedule exists. |
abstract java.util.Iterator<Schedule> |
getAllSchedules()
Get iterator to all available schedules. |
abstract int |
getCountSchedules()
Get the number of defined schedules. |
static ScheduleDAO |
getInstance()
Gets the singleton instance of the ScheduleDAO. |
java.util.Iterator<Schedule> |
iterator()
Get an iterator over the schedules handled by this DAO. |
abstract Schedule |
read(java.lang.String scheduleName)
Read an existing schedule. |
(package private) static void |
reset()
Reset the DAO. |
abstract void |
update(Schedule schedule)
Update a schedule in the DAO. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ScheduleDAO()
Method Detail |
---|
public static ScheduleDAO getInstance()
public abstract void create(Schedule schedule)
schedule
- The schedule to create
ArgumentNotValid
- if schedule is null
PermissionDenied
- if a schedule already existspublic abstract boolean exists(java.lang.String scheduleName)
scheduleName
- The name of a schedule
ArgumentNotValid
- if the schedulename is null or emptypublic abstract Schedule read(java.lang.String scheduleName)
scheduleName
- the name of the schedule
ArgumentNotValid
- if schedulename is null or empty
UnknownID
- if the schedule doesn't existpublic abstract void update(Schedule schedule)
schedule
- The schedule to update
ArgumentNotValid
- If the schedule is null
UnknownID
- If the schedule doesn't exist in the DAO
IOFailure
- If the edition of the schedule to update is
older than the DAO'spublic abstract java.util.Iterator<Schedule> getAllSchedules()
public java.util.Iterator<Schedule> iterator()
iterator
in interface java.lang.Iterable<Schedule>
public abstract int getCountSchedules()
static void reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |