|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.harvester.datamodel.HarvestChannelDAO
public abstract class HarvestChannelDAO
Abstract class for the DAO handling the persistence of HarvestChannel
instances.
Constructor Summary | |
---|---|
HarvestChannelDAO()
Default empty constructor |
Method Summary | |
---|---|
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 java.util.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(java.lang.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 java.util.Iterator<HarvestChannel> |
iterator()
|
abstract void |
update(HarvestChannel harvestChannel)
Updates a HarvestChannel object in the storage backend. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
HarvestChannelDAO()
Method Detail |
---|
public static HarvestChannelDAO getInstance()
HarvestChannelDAO
singleton.
HarvestChannelDAO
singletonpublic abstract java.util.Iterator<HarvestChannel> iterator()
iterator
in interface java.lang.Iterable<HarvestChannel>
public abstract HarvestChannel getById(long id) throws ArgumentNotValid, UnknownID
HarvestChannel
by its UID.
id
- the UID to look for
ArgumentNotValid
- if not ID is supplied
UnknownID
- if the ID is not present in the persistent storage.public abstract HarvestChannel getByName(java.lang.String name) throws ArgumentNotValid, UnknownID
HarvestChannel
by its unique name.
name
- the name to look for
ArgumentNotValid
- if not name is supplied
UnknownID
- 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
object
IOFailure
public abstract void update(HarvestChannel harvestChannel) throws IOFailure
HarvestChannel
object in the storage backend.
harvestChannel
- the HarvestChannel
object
IOFailure
public abstract java.util.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 harvest
HarvestChannel
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 for
HarvestChannel
id or null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |