public class HarvestChannelDBDAO extends HarvestChannelDAO
HarvestChannel
instances.Modifier | Constructor and Description |
---|---|
protected |
HarvestChannelDBDAO()
Create a new HarvestChannelDAO implemented using database.
|
Modifier and Type | Method and Description |
---|---|
void |
create(HarvestChannel harvestChan)
Creates a
HarvestChannel object in the storage backend. |
boolean |
defaultFocusedChannelExists()
Returns true if a default channel exists for focused jobs.
|
Iterator<HarvestChannel> |
getAll(boolean includeSnapshot)
Returns harvest channels by type, sorted first by type (focused first, then broad) and then by name.
|
HarvestChannel |
getById(long id)
Retrieves a
HarvestChannel by its UID. |
HarvestChannel |
getByName(String name)
Retrieves a
HarvestChannel by its unique name. |
HarvestChannel |
getChannelForHarvestDefinition(long harvestDefinitionId)
Returns the
HarvestChannel mapped to the given HarvestDefinition id. |
HarvestChannel |
getDefaultChannel(boolean isSnapshot)
Returns the default
HarvestChannel for the given type of harvest. |
Iterator<HarvestChannel> |
iterator() |
void |
update(HarvestChannel harvestChan)
Updates a
HarvestChannel object in the storage backend. |
getInstance
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
protected HarvestChannelDBDAO()
IllegalState
exception, if default channels are
missing in the DB.public HarvestChannel getById(long id) throws ArgumentNotValid, UnknownID
HarvestChannelDAO
HarvestChannel
by its UID.getById
in class HarvestChannelDAO
id
- the UID to look forArgumentNotValid
- if not ID is suppliedUnknownID
- if the ID is not present in the persistent storage.public HarvestChannel getByName(String name) throws ArgumentNotValid, UnknownID
HarvestChannelDAO
HarvestChannel
by its unique name.getByName
in class HarvestChannelDAO
name
- the name to look forArgumentNotValid
- if not name is suppliedUnknownID
- if the name is not present in the persistent storage.public void create(HarvestChannel harvestChan)
HarvestChannelDAO
HarvestChannel
object in the storage backend.create
in class HarvestChannelDAO
harvestChan
- the HarvestChannel
objectpublic void update(HarvestChannel harvestChan)
HarvestChannelDAO
HarvestChannel
object in the storage backend.update
in class HarvestChannelDAO
harvestChan
- the HarvestChannel
objectpublic Iterator<HarvestChannel> iterator()
iterator
in interface Iterable<HarvestChannel>
iterator
in class HarvestChannelDAO
public Iterator<HarvestChannel> getAll(boolean includeSnapshot)
HarvestChannelDAO
getAll
in class HarvestChannelDAO
includeSnapshot
- if true, returns the single snapshot channel in the iterator.HarvestChannel
.public boolean defaultFocusedChannelExists()
HarvestChannelDAO
defaultFocusedChannelExists
in class HarvestChannelDAO
public HarvestChannel getDefaultChannel(boolean isSnapshot)
HarvestChannelDAO
HarvestChannel
for the given type of harvest.getDefaultChannel
in class HarvestChannelDAO
isSnapshot
- snapshot or partial harvestHarvestChannel
public HarvestChannel getChannelForHarvestDefinition(long harvestDefinitionId)
HarvestChannelDAO
HarvestChannel
mapped to the given HarvestDefinition
id. If no mapping was explicitly
defined, returns null.getChannelForHarvestDefinition
in class HarvestChannelDAO
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.