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 void
add(CustomerInfo customer)
int
count()
Deprecated.CustomerInfo
createCustomerInfo(String name, int population)
CustomerInfo
findById(long id)
List<CustomerInfo>
findByName(String name)
CustomerInfo
findByNameAndPowerType(String name, PowerType type)
Collection<CustomerInfo>
list()
void
recycle()
Implementations must clear out the repository in preparation for a new simulation.int
size()
-
-
-
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:DomainRepo
Implementations must clear out the repository in preparation for a new simulation.- Specified by:
recycle
in interfaceDomainRepo
-
-