1 | package gov.hhs.fha.nhinc.subscription.repository.service;
|
---|
2 |
|
---|
3 | import gov.hhs.fha.nhinc.subscription.repository.data.SubscriptionCriteria;
|
---|
4 | import gov.hhs.fha.nhinc.subscription.repository.data.SubscriptionRecord;
|
---|
5 | import gov.hhs.fha.nhinc.subscription.repository.data.SubscriptionRecordList;
|
---|
6 | import gov.hhs.fha.nhinc.subscription.repository.data.SubscriptionReference;
|
---|
7 | import gov.hhs.fha.nhinc.subscription.repository.data.SubscriptionType;
|
---|
8 |
|
---|
9 | /**
|
---|
10 | * Interface for access to a subscription repository
|
---|
11 | *
|
---|
12 | * @author Neil Webb
|
---|
13 | */
|
---|
14 | public interface SubscriptionRepositoryService
|
---|
15 | {
|
---|
16 | /**
|
---|
17 | * Store a subscription item in the repository.
|
---|
18 | *
|
---|
19 | * @param subscriptionRecord Object to store
|
---|
20 | * @return The subscription reference to the newly created subscription record
|
---|
21 | */
|
---|
22 | public SubscriptionReference storeSubscription(SubscriptionRecord subscriptionRecord);
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * Remove a subscription from the repository.
|
---|
26 | *
|
---|
27 | * @param subscriptionRecord Subscription record to delete.
|
---|
28 | */
|
---|
29 | public void deleteSubscription(SubscriptionRecord subscriptionRecord);
|
---|
30 |
|
---|
31 | /**
|
---|
32 | * Retrieve matching subscriptions matching the provided criteria. Both
|
---|
33 | * the subscribee and subscriber patients must match (may be null) and the
|
---|
34 | * criterion values provided must all be found in the stored criterion.
|
---|
35 | *
|
---|
36 | * @param criteria Subscription criteria to use in matching.
|
---|
37 | * @param subscriptionType Subscription type
|
---|
38 | * @return A list of subscription records matching the provided criteria.
|
---|
39 | */
|
---|
40 | public SubscriptionRecordList retrieveByCriteria(SubscriptionCriteria criteria, SubscriptionType subscriptionType);
|
---|
41 |
|
---|
42 | /**
|
---|
43 | * Retrieve a subscription by subscription reference.
|
---|
44 | *
|
---|
45 | * @param subscriptionReference Subscription reference to the stored subscription record.
|
---|
46 | * @param subscriptionType Subscription type
|
---|
47 | * @return Matching subscription record
|
---|
48 | */
|
---|
49 | public SubscriptionRecord retrieveBySubscriptionReference(SubscriptionReference subscriptionReference, SubscriptionType subscriptionType);
|
---|
50 |
|
---|
51 | /**
|
---|
52 | * Retrieve all subscriptions that match the provided parent subscription reference.
|
---|
53 | *
|
---|
54 | * @param parentSubscriptionReference Parent subscription reference.
|
---|
55 | * @param subscriptionType Subscription type
|
---|
56 | * @return Subscription records matching the provided parent subscription reference.
|
---|
57 | */
|
---|
58 | public SubscriptionRecordList retrieveByParentSubscriptionReference(SubscriptionReference parentSubscriptionReference, SubscriptionType subscriptionType);
|
---|
59 |
|
---|
60 | }
|
---|