Package org.powertac.common.repo
Class CustomerRepo
- java.lang.Object
 - 
- org.powertac.common.repo.CustomerRepo
 
 
- 
- All Implemented Interfaces:
 DomainRepo
@Service public class CustomerRepo extends Object implements DomainRepo
Simple repository for Customer instances.- Author:
 - John Collins
 
 
- 
- 
Constructor Summary
Constructors Constructor Description CustomerRepo() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidadd(CustomerInfo customer)intcount()Deprecated.CustomerInfocreateCustomerInfo(String name, int population)CustomerInfofindById(long id)List<CustomerInfo>findByName(String name)CustomerInfofindByNameAndPowerType(String name, PowerType type)Collection<CustomerInfo>list()voidrecycle()Implementations must clear out the repository in preparation for a new simulation.intsize() 
 - 
 
- 
- 
Method Detail
- 
createCustomerInfo
public CustomerInfo createCustomerInfo(String name, int population)
 
- 
add
public void add(CustomerInfo customer)
 
- 
list
public Collection<CustomerInfo> list()
 
- 
count
@Deprecated public int count()
Deprecated. 
- 
size
public int size()
 
- 
findById
public CustomerInfo findById(long id)
 
- 
findByName
public List<CustomerInfo> findByName(String name)
 
- 
findByNameAndPowerType
public CustomerInfo findByNameAndPowerType(String name, PowerType type)
 
- 
recycle
public void recycle()
Description copied from interface:DomainRepoImplementations must clear out the repository in preparation for a new simulation.- Specified by:
 recyclein interfaceDomainRepo
 
 - 
 
 -