public class InMemorySubscriptionMapper extends NonTransactionalMapper implements SubscriptionMapper
Mapper.Transaction<T>, Mapper.VoidTransaction
Constructor and Description |
---|
InMemorySubscriptionMapper() |
Modifier and Type | Method and Description |
---|---|
void |
delete(Subscription subscription)
Deletes the given subscription.
|
void |
deleteAll() |
void |
endRequest()
Do nothing
|
Subscription |
findMailboxSubscriptionForUser(String user,
String mailbox)
Finds any subscriptions for a given user to the given mailbox.
|
List<Subscription> |
findSubscriptionsForUser(String user)
Finds subscriptions for the given user.
|
void |
save(Subscription subscription)
Saves the given subscription.
|
execute
public void delete(Subscription subscription)
SubscriptionMapper
delete
in interface SubscriptionMapper
subscription
- not nullSubscriptionMapper.delete(org.apache.james.mailbox.store.user.model.Subscription)
public Subscription findMailboxSubscriptionForUser(String user, String mailbox)
SubscriptionMapper
findMailboxSubscriptionForUser
in interface SubscriptionMapper
user
- not nullmailbox
- not nullSubscription
,
or null when the user is not subscribed to the given mailboxSubscriptionMapper.findMailboxSubscriptionForUser(java.lang.String, java.lang.String)
public List<Subscription> findSubscriptionsForUser(String user)
SubscriptionMapper
findSubscriptionsForUser
in interface SubscriptionMapper
user
- not nullSubscriptionMapper.findSubscriptionsForUser(java.lang.String)
public void save(Subscription subscription)
SubscriptionMapper
save
in interface SubscriptionMapper
subscription
- not nullSubscriptionMapper.save(org.apache.james.mailbox.store.user.model.Subscription)
public void deleteAll()
public void endRequest()
endRequest
in interface Mapper
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.