|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.powertac.common.repo.TariffRepo
@Repository public class TariffRepo
Repository for TariffSpecifications, Tariffs, Rates, and other related types.
| Constructor Summary | |
|---|---|
TariffRepo()
|
|
| Method Summary | |
|---|---|
void |
addBalancingOrder(BalancingOrder order)
Adds a balancing order, indexed by its TariffSpec |
void |
addSpecification(TariffSpecification spec)
Adds a TariffSpecification to the repo just in case another spec (or this one) has not already been added sometime in the past. |
void |
addTariff(Tariff tariff)
|
List<Tariff> |
findActiveTariffs(PowerType type)
Returns the list of active tariffs that exactly match the given PowerType. |
List<Tariff> |
findAllActiveTariffs(PowerType type)
Returns the list of active tariffs that can be used by a customer of the given PowerType, including those that are more generic than the specific type. |
List<Tariff> |
findAllTariffs()
|
List<TariffSpecification> |
findAllTariffSpecifications()
|
Rate |
findRateById(long id)
|
List<Tariff> |
findRecentActiveTariffs(int n,
PowerType type)
Returns the n most "recent" active tariffs from each broker that can be used by a customer with the given powerType. |
TariffSpecification |
findSpecificationById(long id)
|
Tariff |
findTariffById(long id)
|
List<Tariff> |
findTariffsByBroker(Broker broker)
|
List<Tariff> |
findTariffsByState(Tariff.State state)
|
List<TariffSpecification> |
findTariffSpecificationsByPowerType(PowerType type)
|
Collection<BalancingOrder> |
getBalancingOrders()
Retrieves the complete set of balancing orders |
Tariff |
getDefaultTariff(PowerType type)
|
boolean |
isRemoved(long tariffId)
Tests whether a tariff has been deleted. |
void |
recycle()
Implementations must clear out the repository in preparation for a new simulation. |
void |
removeTariff(Tariff tariff)
Removes a tariff and its specification from the repo |
void |
setDefaultTariff(TariffSpecification newSpec)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TariffRepo()
| Method Detail |
|---|
public void addSpecification(TariffSpecification spec)
public void setDefaultTariff(TariffSpecification newSpec)
public Tariff getDefaultTariff(PowerType type)
public TariffSpecification findSpecificationById(long id)
public List<TariffSpecification> findTariffSpecificationsByPowerType(PowerType type)
public List<TariffSpecification> findAllTariffSpecifications()
public void addTariff(Tariff tariff)
public Tariff findTariffById(long id)
public List<Tariff> findAllTariffs()
public List<Tariff> findTariffsByState(Tariff.State state)
public List<Tariff> findActiveTariffs(PowerType type)
public List<Tariff> findAllActiveTariffs(PowerType type)
public List<Tariff> findRecentActiveTariffs(int n,
PowerType type)
public List<Tariff> findTariffsByBroker(Broker broker)
public void removeTariff(Tariff tariff)
public boolean isRemoved(long tariffId)
public Rate findRateById(long id)
public void addBalancingOrder(BalancingOrder order)
public Collection<BalancingOrder> getBalancingOrders()
public void recycle()
DomainRepo
recycle in interface DomainRepo
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||