dk.netarkivet.harvester.datamodel.extendedfield
Class ExtendedFieldTypeDAO

java.lang.Object
  extended by dk.netarkivet.harvester.datamodel.extendedfield.ExtendedFieldTypeDAO
Direct Known Subclasses:
ExtendedFieldTypeDBDAO

public abstract class ExtendedFieldTypeDAO
extends java.lang.Object

Interface for creating and accessing extended fields in persistent storage.


Field Summary
protected static ExtendedFieldTypeDAO instance
          The database singleton model.
 
Constructor Summary
protected ExtendedFieldTypeDAO()
          constructor used when creating singleton.
 
Method Summary
abstract  boolean exists(java.lang.Long aExtendedfieldtypeId)
          Tests if exists an ExtendedFieldType with the given ID.
abstract  java.util.List<ExtendedFieldType> getAll()
           
static ExtendedFieldTypeDAO getInstance()
          If an instance exists, return it, otherwise instantiate one, and return it.
abstract  ExtendedFieldType read(java.lang.Long aExtendedfieldtypeId)
          Read an ExtendedFieldType belonging to the given id.
protected static void reset()
          Reset the DAO instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

protected static ExtendedFieldTypeDAO instance
The database singleton model.

Constructor Detail

ExtendedFieldTypeDAO

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

Method Detail

reset

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


exists

public abstract boolean exists(java.lang.Long aExtendedfieldtypeId)
Tests if exists an ExtendedFieldType with the given ID.

Parameters:
aExtendedfieldtypeId - An id belonging to an ExtendedFieldType
Returns:
true, if there exists an ExtendedFieldType with the given ID, otherwise returns false.

read

public abstract ExtendedFieldType read(java.lang.Long aExtendedfieldtypeId)
Read an ExtendedFieldType belonging to the given id.

Parameters:
aExtendedfieldtypeId - an id belonging to a ExtendedFieldType
Returns:
an ExtendedFieldType from belonging to the given id.

getAll

public abstract java.util.List<ExtendedFieldType> getAll()
Returns:
a list of all ExtendedFieldTypes.

getInstance

public static ExtendedFieldTypeDAO getInstance()
If an instance exists, return it, otherwise instantiate one, and return it.

Returns:
the instance of this class.