dk.netarkivet.harvester.datamodel.extendedfield
Class ExtendedFieldValueDAO

java.lang.Object
  extended by dk.netarkivet.harvester.datamodel.extendedfield.ExtendedFieldValueDAO
Direct Known Subclasses:
ExtendedFieldValueDBDAO

public abstract class ExtendedFieldValueDAO
extends java.lang.Object

Interface for creating and accessing extended fields in persistent storage.


Field Summary
protected static ExtendedFieldValueDAO instance
          The one and only instance of this DAO.
 
Constructor Summary
protected ExtendedFieldValueDAO()
          constructor used when creating singleton.
 
Method Summary
abstract  void create(ExtendedFieldValue aExtendedFieldValue)
          Create a ExtendedFieldValue in persistent storage.
abstract  void delete(long aExtendedfieldValueID)
          Delete a ExtendedFieldValue in persistent storage.
abstract  boolean exists(java.lang.Long aExtendedFieldValueID)
          Find out if there exists in persistent storage a ExtendedFieldValue with the given id.
static ExtendedFieldValueDAO getInstance()
           
abstract  ExtendedFieldValue read(java.lang.Long aExtendedFieldID, java.lang.Long aInstanceID)
          Read the ExtendedFieldValue with the given extendedFieldID.
static void reset()
          Reset the DAO instance.
abstract  void update(ExtendedFieldValue aExtendedFieldValue)
          Update a ExtendedFieldValue in persistent storage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

protected static ExtendedFieldValueDAO instance
The one and only instance of this DAO.

Constructor Detail

ExtendedFieldValueDAO

protected ExtendedFieldValueDAO()
constructor used when creating singleton. Do not call directly.

Method Detail

reset

public static void reset()
Reset the DAO instance. Only for use from within tests.


exists

public abstract boolean exists(java.lang.Long aExtendedFieldValueID)
Find out if there exists in persistent storage a ExtendedFieldValue with the given id.

Parameters:
aExtendedFieldValueID - An id associated with a ExtendedFieldValue
Returns:
true, if there already exists in persistent storage a ExtendedFieldValue with the given id.

create

public abstract void create(ExtendedFieldValue aExtendedFieldValue)
Create a ExtendedFieldValue in persistent storage.

Parameters:
aExtendedFieldValue - The ExtendedFieldValue to create in persistent storage.

read

public abstract ExtendedFieldValue read(java.lang.Long aExtendedFieldID,
                                        java.lang.Long aInstanceID)
Read the ExtendedFieldValue with the given extendedFieldID.

Parameters:
aExtendedFieldID - A given ID for a ExtendedFieldValue
aInstanceID - A given instanceID
Returns:
the ExtendedFieldValue with the given extendedFieldID.

update

public abstract void update(ExtendedFieldValue aExtendedFieldValue)
Update a ExtendedFieldValue in persistent storage.

Parameters:
aExtendedFieldValue - The ExtendedFieldValue to update

delete

public abstract void delete(long aExtendedfieldValueID)
Delete a ExtendedFieldValue in persistent storage.

Parameters:
aExtendedfieldValueID - The ID for a extendedFieldValue to delete

getInstance

public static ExtendedFieldValueDAO getInstance()
Returns:
the singleton instance of the ExtendedFieldVAlueDAO