public class SubscriptionsPersistentStoreImpl extends Object implements SubscriptionsPersistentStore
SUBSCRIPTIONS_TYPE
Constructor and Description |
---|
SubscriptionsPersistentStoreImpl(PersistentStore persistentStore) |
Modifier and Type | Method and Description |
---|---|
void |
addEmail(String id,
String email)
Associate an email address with an ID.
|
void |
addEmails(String id,
Set<String> emails)
Associate a set of email addresses with an ID.
|
Set<String> |
getEmails(String id)
Get the set of emails that have been associated with an ID.
|
Set<String> |
getSubscriptions(String email)
Get the set of subscription ids that have been associated with an email.
|
void |
removeAllEmails(String id)
Remove all emails that have been associated with an ID.
|
void |
removeEmail(String id,
String email)
Remove an email that has been associated with an ID.
|
void |
removeEmails(String id,
Set<String> emails)
Remove a set of emails that have been associated with an ID.
|
public SubscriptionsPersistentStoreImpl(PersistentStore persistentStore)
persistentStore
- must be non-nullpublic void addEmails(String id, Set<String> emails)
SubscriptionsPersistentStore
addEmails
in interface SubscriptionsPersistentStore
id
- must be non-null and non-blankemails
- must be non-null and elements must be non-blankpublic void removeEmails(String id, Set<String> emails)
SubscriptionsPersistentStore
removeEmails
in interface SubscriptionsPersistentStore
id
- must be non-null and non-blankemails
- must be non-null and elements must be non-blankpublic Set<String> getSubscriptions(String email)
SubscriptionsPersistentStore
getSubscriptions
in interface SubscriptionsPersistentStore
email
- must be non-null and non-blankpublic Set<String> getEmails(String id)
SubscriptionsPersistentStore
getEmails
in interface SubscriptionsPersistentStore
id
- must be non-null and non-blankpublic final void addEmail(String id, String email)
SubscriptionsPersistentStore
addEmail
in interface SubscriptionsPersistentStore
id
- must be non-null and non-blankemail
- must be non-null and non-blankpublic final void removeAllEmails(String id)
SubscriptionsPersistentStore
removeAllEmails
in interface SubscriptionsPersistentStore
id
- must be non-null and non-blankpublic final void removeEmail(String id, String email)
SubscriptionsPersistentStore
removeEmail
in interface SubscriptionsPersistentStore
id
- must be non-null and non-blankemail
- must be non-nullThis work is licensed under a Creative Commons Attribution 4.0 International License.