|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.checker.DAOSupport
org.dspace.checker.BitstreamInfoDAO
public final class BitstreamInfoDAO
Database Access Object for bitstream information (metadata). Also performs the needed insert/update/delete commands on the database for the checksum checker.
| Field Summary | |
|---|---|
static String |
GET_OLDEST_BITSTREAM
This selects the next bitstream in order of last processing end date. |
static String |
GET_OLDEST_BITSTREAM_DATE
Selects the next bitstream in order of last processing end date, ensuring that no bitstream is checked more than once since the date parameter used. |
static String |
GET_OLDEST_BITSTREAM_DATE_ORACLE
|
static String |
GET_OLDEST_BITSTREAM_ORACLE
|
static int |
SENTINEL
This value should be returned by next() to indicate that
there are no more values. |
| Constructor Summary | |
|---|---|
BitstreamInfoDAO()
Default constructor |
|
| Method Summary | |
|---|---|
protected int |
deleteBitstreamInfo(int id,
Connection conn)
Deletes the bitstream from the most_recent_checksum table if it exist. |
int |
deleteBitstreamInfoWithHistory(int id)
|
BitstreamInfo |
findByBitstreamId(int id)
Find a bitstream by its id. |
List<Integer> |
getCollectionBitstreams(int collectionId)
Get the bitstream ids for a given collection |
List<Integer> |
getCommunityBitstreams(int communityId)
Get the bitstream ids for a given community |
List<Integer> |
getItemBitstreams(int itemId)
Get the bitstream ids for a given Item |
int |
getOldestBitstream()
Get the oldest bitstream in the most recent checksum table. |
int |
getOldestBitstream(Timestamp lessThanDate)
Returns the oldest bistream that in the set of bitstreams that are less than the specified date. |
void |
update(BitstreamInfo info)
Updates most_recent_checksum with latest checksum and result of comparison with previous checksum. |
void |
updateMissingBitstreams()
Queries the bitstream table for bitstream IDs that are not yet in the most_recent_checksum table, and inserts them into the most_recent_checksum and checksum_history tables. |
| Methods inherited from class org.dspace.checker.DAOSupport |
|---|
cleanup, cleanup, cleanup, cleanup |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SENTINEL
next() to indicate that
there are no more values.
public static final String GET_OLDEST_BITSTREAM
public static final String GET_OLDEST_BITSTREAM_ORACLE
public static final String GET_OLDEST_BITSTREAM_DATE
public static final String GET_OLDEST_BITSTREAM_DATE_ORACLE
| Constructor Detail |
|---|
public BitstreamInfoDAO()
| Method Detail |
|---|
public void update(BitstreamInfo info)
info - The BitstreamInfo to update.
IllegalArgumentException - if the BitstreamInfo given is null.public BitstreamInfo findByBitstreamId(int id)
id - the bitstream id
public void updateMissingBitstreams()
protected int deleteBitstreamInfo(int id,
Connection conn)
id - the bitstream id.
public int deleteBitstreamInfoWithHistory(int id)
public int getOldestBitstream()
public int getOldestBitstream(Timestamp lessThanDate)
lessThanDate -
public List<Integer> getItemBitstreams(int itemId)
itemId -
public List<Integer> getCollectionBitstreams(int collectionId)
collectionId - The id of the collection
public List<Integer> getCommunityBitstreams(int communityId)
communityId - the community id
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||