public abstract class HarvestChannelDAO extends Object implements DAO, Iterable<HarvestChannel>
HarvestChannel
instances.Modifier and Type | Method and Description |
---|---|
abstract void |
create(HarvestChannel harvestChannel)
Creates a
HarvestChannel object in the storage backend. |
abstract boolean |
defaultFocusedChannelExists()
Returns true if a default channel exists for focused jobs.
|
abstract Iterator<HarvestChannel> |
getAll(boolean includeSnapshot)
Returns harvest channels by type, sorted first by type (focused first, then broad) and then by name.
|
abstract HarvestChannel |
getById(long id)
Retrieves a
HarvestChannel by its UID. |
abstract HarvestChannel |
getByName(String name)
Retrieves a
HarvestChannel by its unique name. |
abstract HarvestChannel |
getChannelForHarvestDefinition(long harvestDefinitionId)
Returns the
HarvestChannel mapped to the given HarvestDefinition id. |
abstract HarvestChannel |
getDefaultChannel(boolean snapshot)
Returns the default
HarvestChannel for the given type of harvest. |
static HarvestChannelDAO |
getInstance()
Gets the
HarvestChannelDAO singleton. |
abstract Iterator<HarvestChannel> |
iterator() |
abstract void |
update(HarvestChannel harvestChannel)
Updates a
HarvestChannel object in the storage backend. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public static HarvestChannelDAO getInstance()
HarvestChannelDAO
singleton.HarvestChannelDAO
singletonpublic abstract Iterator<HarvestChannel> iterator()
iterator
in interface Iterable<HarvestChannel>
public abstract HarvestChannel getById(long id) throws ArgumentNotValid, UnknownID
HarvestChannel
by its UID.id
- the UID to look forArgumentNotValid
- if not ID is suppliedUnknownID
- if the ID is not present in the persistent storage.public abstract HarvestChannel getByName(String name) throws ArgumentNotValid, UnknownID
HarvestChannel
by its unique name.name
- the name to look forArgumentNotValid
- if not name is suppliedUnknownID
- if the name is not present in the persistent storage.public abstract void create(HarvestChannel harvestChannel) throws IOFailure
HarvestChannel
object in the storage backend.harvestChannel
- the HarvestChannel
objectIOFailure
public abstract void update(HarvestChannel harvestChannel) throws IOFailure
HarvestChannel
object in the storage backend.harvestChannel
- the HarvestChannel
objectIOFailure
public abstract Iterator<HarvestChannel> getAll(boolean includeSnapshot)
includeSnapshot
- if true, returns the single snapshot channel in the iterator.HarvestChannel
.public abstract boolean defaultFocusedChannelExists()
public abstract HarvestChannel getDefaultChannel(boolean snapshot)
HarvestChannel
for the given type of harvest.snapshot
- snapshot or partial harvestHarvestChannel
public abstract HarvestChannel getChannelForHarvestDefinition(long harvestDefinitionId)
HarvestChannel
mapped to the given HarvestDefinition
id. If no mapping was explicitly
defined, returns null.harvestDefinitionId
- the HarvestDefinition
id to look forHarvestChannel
id or nullCopyright © 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.