public abstract class ScheduleDAO extends Object implements DAO, Iterable<Schedule>
Modifier | Constructor and Description |
---|---|
protected |
ScheduleDAO()
Constructor made private to enforce singleton.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
create(Schedule schedule)
Create a new schedule.
|
abstract boolean |
exists(String scheduleName)
Returns whether a named schedule exists.
|
boolean |
existsDefaultSchedule()
Does the schedule represented by HarvesterSettings.DOMAIN_CONFIG_SCHEDULE exist?
|
abstract Iterator<Schedule> |
getAllSchedules()
Get iterator to all available schedules.
|
abstract int |
getCountSchedules()
Get the number of defined schedules.
|
String |
getDefaultScheduleName() |
static ScheduleDAO |
getInstance()
Gets the singleton instance of the ScheduleDAO.
|
Iterator<Schedule> |
iterator()
Get an iterator over the schedules handled by this DAO.
|
abstract Schedule |
read(String scheduleName)
Read an existing schedule.
|
abstract void |
update(Schedule schedule)
Update a schedule in the DAO.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
protected ScheduleDAO()
public static ScheduleDAO getInstance()
public abstract void create(Schedule schedule)
schedule
- The schedule to createArgumentNotValid
- if schedule is nullPermissionDenied
- if a schedule already existspublic abstract boolean exists(String scheduleName)
scheduleName
- The name of a scheduleArgumentNotValid
- if the schedulename is null or emptypublic abstract Schedule read(String scheduleName)
scheduleName
- the name of the scheduleArgumentNotValid
- if schedulename is null or emptyUnknownID
- if the schedule doesn't existpublic abstract void update(Schedule schedule)
schedule
- The schedule to updateArgumentNotValid
- If the schedule is nullUnknownID
- If the schedule doesn't exist in the DAOIOFailure
- If the edition of the schedule to update is older than the DAO'spublic abstract Iterator<Schedule> getAllSchedules()
public Iterator<Schedule> iterator()
public abstract int getCountSchedules()
public boolean existsDefaultSchedule()
public String getDefaultScheduleName()
Copyright © 2005–2016 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.