@Service public class TariffSubscriptionRepo extends Object implements org.powertac.common.repo.DomainRepo
| Constructor and Description |
|---|
TariffSubscriptionRepo() |
| Modifier and Type | Method and Description |
|---|---|
TariffSubscription |
add(TariffSubscription subscription)
Adds an existing subscription to the repo.
|
List<TariffSubscription> |
findActiveSubscriptionsForBroker(org.powertac.common.Broker broker)
Returns the list of active subscriptions for a given broker.
|
List<TariffSubscription> |
findActiveSubscriptionsForCustomer(org.powertac.common.CustomerInfo customer)
Returns the list of active subscriptions for a given customer.
|
TariffSubscription |
findSubscriptionForTariffAndCustomer(org.powertac.common.Tariff tariff,
org.powertac.common.CustomerInfo customer)
Returns the subscription, if any, for the specified tariff and customer.
|
List<TariffSubscription> |
findSubscriptionsForBroker(org.powertac.common.Broker b)
Returns the list of subscriptions for the specified broker.
|
List<TariffSubscription> |
findSubscriptionsForCustomer(org.powertac.common.CustomerInfo customer)
Returns the list of subscriptions for a given customer.
|
List<TariffSubscription> |
findSubscriptionsForTariff(org.powertac.common.Tariff tariff)
Returns the list of subscriptions for a given tariff.
|
List<TariffSubscription> |
getRevokedSubscriptionList(org.powertac.common.CustomerInfo customer)
Returns the list of subscriptions for this customer that have been
revoked and have non-zero committed customer counts.
|
TariffSubscription |
getSubscription(org.powertac.common.CustomerInfo customer,
org.powertac.common.Tariff tariff)
Returns the TariffSubscription for the given Tariff/Customer pair, creating
it if necessary.
|
void |
recycle()
Clears out the repo in preparation for another simulation.
|
void |
removeSubscriptionsForTariff(org.powertac.common.Tariff tariff)
Removes all subscriptions for the given tariff.
|
public TariffSubscription add(TariffSubscription subscription)
public TariffSubscription getSubscription(org.powertac.common.CustomerInfo customer, org.powertac.common.Tariff tariff)
public TariffSubscription findSubscriptionForTariffAndCustomer(org.powertac.common.Tariff tariff, org.powertac.common.CustomerInfo customer)
public List<TariffSubscription> findSubscriptionsForTariff(org.powertac.common.Tariff tariff)
public List<TariffSubscription> findSubscriptionsForCustomer(org.powertac.common.CustomerInfo customer)
public List<TariffSubscription> findActiveSubscriptionsForCustomer(org.powertac.common.CustomerInfo customer)
public List<TariffSubscription> findSubscriptionsForBroker(org.powertac.common.Broker b)
public List<TariffSubscription> findActiveSubscriptionsForBroker(org.powertac.common.Broker broker)
public List<TariffSubscription> getRevokedSubscriptionList(org.powertac.common.CustomerInfo customer)
public void removeSubscriptionsForTariff(org.powertac.common.Tariff tariff)
public void recycle()
recycle in interface org.powertac.common.repo.DomainRepoCopyright © 2016 Power TAC. All Rights Reserved.