Package org.powertac.common.repo
Class BrokerRepo
- java.lang.Object
-
- org.powertac.common.repo.BrokerRepo
-
- All Implemented Interfaces:
DomainRepo
@Service public class BrokerRepo extends Object implements DomainRepo
Repository for Brokers, including competitors and other market participants.- Author:
- John Collins
-
-
Constructor Summary
Constructors Constructor Description BrokerRepo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Broker broker)
Broker
findById(long id)
Broker
findByUsername(String username)
List<Broker>
findDisabledBrokers()
Broker
findOrCreateByUsername(String username)
List<String>
findRetailBrokerNames()
List<Broker>
findRetailBrokers()
List<Broker>
findWholesaleBrokers()
static BrokerRepo
getInstance()
Collection<Broker>
list()
void
recycle()
Implementations must clear out the repository in preparation for a new simulation.
-
-
-
Method Detail
-
add
public void add(Broker broker)
-
list
public Collection<Broker> list()
-
findById
public Broker findById(long id)
-
recycle
public void recycle()
Description copied from interface:DomainRepo
Implementations must clear out the repository in preparation for a new simulation.- Specified by:
recycle
in interfaceDomainRepo
-
getInstance
public static BrokerRepo getInstance()
-
-