public class JdbcSubscriptionRepository extends Object implements SubscriptionRepository
SubscriptionRepository
that stores subscription data in a SQL databaseConstructor and Description |
---|
JdbcSubscriptionRepository(DataSource dataSource,
String table) |
Modifier and Type | Method and Description |
---|---|
void |
delete(Subscription subscription)
Deletes given subscription from subscription repository
|
List<Subscription> |
findAll()
Obtains all the existing subscriptions
|
Subscription |
findOne(String tenantId)
Retrieves subscription data for a given tenant
|
void |
save(Subscription subscription)
Saves given subscription to subscription repository
|
public JdbcSubscriptionRepository(@Nonnull DataSource dataSource, @Nonnull String table)
@Nullable public Subscription findOne(@Nonnull String tenantId)
SubscriptionRepository
findOne
in interface SubscriptionRepository
tenantId
- tenant id to retrieve subscription data for@Nonnull public List<Subscription> findAll()
SubscriptionRepository
findAll
in interface SubscriptionRepository
public void save(@Nonnull Subscription subscription)
SubscriptionRepository
save
in interface SubscriptionRepository
subscription
- subscription object to savepublic void delete(@Nonnull Subscription subscription)
SubscriptionRepository
delete
in interface SubscriptionRepository
subscription
- subscription object to deleteCopyright © 2019 SAP SE. All rights reserved.