Package org.dspace.eperson.dao
Interface SubscriptionDAO
- All Superinterfaces:
GenericDAO<Subscription>
- All Known Implementing Classes:
SubscriptionDAOImpl
Database Access Object interface class for the Subscription object.
The implementation of this class is responsible for all database calls for the Subscription object and is
autowired by spring
This class should only be accessed from a single service and should never be exposed outside of the API
- Author:
- kevinvandevelde at atmire.com
-
Method Summary
Modifier and TypeMethodDescriptionCount all subscriptionscountAllByEPerson(Context context, EPerson ePerson) Count all subscriptions belong to an ePersoncountAllByEPersonAndDso(Context context, EPerson ePerson, DSpaceObject dSpaceObject) Count all subscriptions related to a DSpaceObject belong to an ePersonvoiddeleteByDSOAndEPerson(Context context, DSpaceObject dSpaceObject, EPerson eperson) Delete all subscriptions related to a DSpaceObject belong to an ePersonvoiddeleteByDspaceObject(Context context, DSpaceObject dSpaceObject) Delete all subscription of provided dSpaceObjectvoiddeleteByEPerson(Context context, EPerson eperson) Delete all subscription of provided ePersonfindAllOrderedByDSO(Context context, Integer limit, Integer offset) Return a paginated list of subscriptions ordered by DSpaceObjectfindAllOrderedByIDAndResourceType(Context context, String resourceType, Integer limit, Integer offset) Return a paginated list of all subscriptions ordered by ID and resourceTypefindAllSubscriptionsBySubscriptionTypeAndFrequency(Context context, String subscriptionType, String frequencyValue) Return a list of all subscriptions by subscriptionType and frequencyfindByEPerson(Context context, EPerson eperson, Integer limit, Integer offset) Return a paginated list of all subscriptions of the epersonfindByEPersonAndDso(Context context, EPerson eperson, DSpaceObject dSpaceObject, Integer limit, Integer offset) Return a paginated list of subscriptions related to a DSpaceObject belong to an ePerson
-
Method Details
-
deleteByDspaceObject
Delete all subscription of provided dSpaceObject- Parameters:
context- DSpace context objectdSpaceObject- DSpace resource- Throws:
SQLException- If database error
-
findByEPerson
List<Subscription> findByEPerson(Context context, EPerson eperson, Integer limit, Integer offset) throws SQLException Return a paginated list of all subscriptions of the eperson- Parameters:
context- DSpace context objecteperson- ePerson whose subscriptions want to findlimit- Paging limitoffset- The position of the first result to return- Returns:
- Throws:
SQLException- If database error
-
findByEPersonAndDso
List<Subscription> findByEPersonAndDso(Context context, EPerson eperson, DSpaceObject dSpaceObject, Integer limit, Integer offset) throws SQLException Return a paginated list of subscriptions related to a DSpaceObject belong to an ePerson- Parameters:
context- DSpace context objecteperson- ePerson whose subscriptions want to finddSpaceObject- DSpaceObject of whom subscriptions want to findlimit- Paging limitoffset- The position of the first result to return- Returns:
- Throws:
SQLException- If database error
-
deleteByEPerson
Delete all subscription of provided ePerson- Parameters:
context- DSpace context objecteperson- ePerson whose subscriptions want to delete- Throws:
SQLException- If database error
-
deleteByDSOAndEPerson
void deleteByDSOAndEPerson(Context context, DSpaceObject dSpaceObject, EPerson eperson) throws SQLException Delete all subscriptions related to a DSpaceObject belong to an ePerson- Parameters:
context- DSpace context objectdSpaceObject- DSpaceObject of whom subscriptions want to deleteeperson- ePerson whose subscriptions want to delete- Throws:
SQLException- If database error
-
findAllOrderedByIDAndResourceType
List<Subscription> findAllOrderedByIDAndResourceType(Context context, String resourceType, Integer limit, Integer offset) throws SQLException Return a paginated list of all subscriptions ordered by ID and resourceType- Parameters:
context- DSpace context objectresourceType- Could be Collection or Communitylimit- Paging limitoffset- The position of the first result to return- Returns:
- Throws:
SQLException- If database error
-
findAllOrderedByDSO
List<Subscription> findAllOrderedByDSO(Context context, Integer limit, Integer offset) throws SQLException Return a paginated list of subscriptions ordered by DSpaceObject- Parameters:
context- DSpace context objectlimit- Paging limitoffset- The position of the first result to return- Returns:
- Throws:
SQLException- If database error
-
findAllSubscriptionsBySubscriptionTypeAndFrequency
List<Subscription> findAllSubscriptionsBySubscriptionTypeAndFrequency(Context context, String subscriptionType, String frequencyValue) throws SQLException Return a list of all subscriptions by subscriptionType and frequency- Parameters:
context- DSpace context objectsubscriptionType- Could be "content" or "statistics". NOTE: in DSpace we have only "content"frequencyValue- Could be "D" stand for Day, "W" stand for Week, and "M" stand for Month- Returns:
- Throws:
SQLException- If database error
-
countAll
Count all subscriptions- Parameters:
context- DSpace context object- Returns:
- Total of all subscriptions
- Throws:
SQLException- If database error
-
countAllByEPerson
Count all subscriptions belong to an ePerson- Parameters:
context- DSpace context objectePerson- ePerson whose subscriptions want count- Returns:
- Total of all subscriptions belong to an ePerson
- Throws:
SQLException- If database error
-
countAllByEPersonAndDso
Long countAllByEPersonAndDso(Context context, EPerson ePerson, DSpaceObject dSpaceObject) throws SQLException Count all subscriptions related to a DSpaceObject belong to an ePerson- Parameters:
context- DSpace context objectePerson- ePerson whose subscriptions want countdSpaceObject- DSpaceObject of whom subscriptions want count- Returns:
- Throws:
SQLException- If database error
-