Class ExtendedFieldTypeDAO
- java.lang.Object
-
- dk.netarkivet.harvester.datamodel.extendedfield.ExtendedFieldTypeDAO
-
- All Implemented Interfaces:
DAO
- Direct Known Subclasses:
ExtendedFieldTypeDBDAO
public abstract class ExtendedFieldTypeDAO extends java.lang.Object implements DAO
Interface for creating and accessing extended fields in persistent storage.
-
-
Field Summary
Fields Modifier and Type Field Description protected static ExtendedFieldTypeDAO
instance
The database singleton model.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ExtendedFieldTypeDAO()
constructor used when creating singleton.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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.
-
-