public class HarvestedCollectionServiceImpl extends Object implements HarvestedCollectionService
| Modifier and Type | Field and Description |
|---|---|
protected HarvestedCollectionDAO |
harvestedCollectionDAO |
| Modifier | Constructor and Description |
|---|---|
protected |
HarvestedCollectionServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
HarvestedCollection |
create(Context context,
Collection collection)
Create a new harvest instance row for a specified collection.
|
void |
delete(Context context,
HarvestedCollection harvestedCollection) |
boolean |
exists(Context context) |
HarvestedCollection |
find(Context context,
Collection collection)
Find the harvest settings corresponding to this collection
|
List<HarvestedCollection> |
findAll(Context context)
Find all collections that are set up for harvesting
return: list of collection id's
|
List<HarvestedCollection> |
findByStatus(Context context,
int status)
Find all collections with the specified status flag.
|
HarvestedCollection |
findNewestHarvest(Context context)
Find the collection that was harvested most recently.
|
HarvestedCollection |
findOldestHarvest(Context context)
Find the collection that was harvested the longest time ago.
|
List<HarvestedCollection> |
findReady(Context context)
Find all collections that are ready for harvesting
return: list of collection id's
|
boolean |
isHarvestable(Context context,
Collection collection)
Returns whether the specified collection is harvestable, i.e.
|
boolean |
isHarvestable(HarvestedCollection harvestedCollection)
Returns whether this harvest instance is actually harvestable, i.e.
|
boolean |
isReady(Context context,
Collection collection)
Returns whether the specified collection is ready for immediate harvest.
|
boolean |
isReady(HarvestedCollection harvestedCollection) |
void |
update(Context context,
HarvestedCollection harvestedCollection) |
@Autowired(required=true) protected HarvestedCollectionDAO harvestedCollectionDAO
public HarvestedCollection find(Context context, Collection collection) throws SQLException
HarvestedCollectionServicefind in interface HarvestedCollectionServiceSQLExceptionpublic HarvestedCollection create(Context context, Collection collection) throws SQLException
HarvestedCollectionServicecreate in interface HarvestedCollectionServiceSQLExceptionpublic boolean isHarvestable(Context context, Collection collection) throws SQLException
HarvestedCollectionServiceisHarvestable in interface HarvestedCollectionServiceSQLExceptionpublic boolean isHarvestable(HarvestedCollection harvestedCollection) throws SQLException
HarvestedCollectionServiceisHarvestable in interface HarvestedCollectionServiceSQLExceptionpublic boolean isReady(Context context, Collection collection) throws SQLException
HarvestedCollectionServiceisReady in interface HarvestedCollectionServiceSQLExceptionpublic boolean isReady(HarvestedCollection harvestedCollection) throws SQLException
isReady in interface HarvestedCollectionServiceSQLExceptionpublic List<HarvestedCollection> findAll(Context context) throws SQLException
HarvestedCollectionServicefindAll in interface HarvestedCollectionServiceSQLExceptionpublic List<HarvestedCollection> findReady(Context context) throws SQLException
HarvestedCollectionServicefindReady in interface HarvestedCollectionServiceSQLExceptionpublic List<HarvestedCollection> findByStatus(Context context, int status) throws SQLException
HarvestedCollectionServicefindByStatus in interface HarvestedCollectionServicestatus - see HarvestInstance.STATUS_...SQLExceptionpublic HarvestedCollection findOldestHarvest(Context context) throws SQLException
HarvestedCollectionServicefindOldestHarvest in interface HarvestedCollectionServiceSQLExceptionpublic HarvestedCollection findNewestHarvest(Context context) throws SQLException
HarvestedCollectionServicefindNewestHarvest in interface HarvestedCollectionServiceSQLExceptionpublic void delete(Context context, HarvestedCollection harvestedCollection) throws SQLException
delete in interface HarvestedCollectionServiceSQLExceptionpublic void update(Context context, HarvestedCollection harvestedCollection) throws SQLException
update in interface HarvestedCollectionServiceSQLExceptionpublic boolean exists(Context context) throws SQLException
exists in interface HarvestedCollectionServiceSQLExceptionCopyright © 2016 DuraSpace. All Rights Reserved.