public class MapCustomerRepository extends Object implements CustomerRepository
| Constructor and Description |
|---|
MapCustomerRepository() |
| Modifier and Type | Method and Description |
|---|---|
long |
count()
Returns the number of entities available.
|
void |
delete(Long id)
Deletes the entity with the given id.
|
void |
deleteAll()
Deletes all entities managed by the repository.
|
boolean |
exists(Long id)
Returns whether an entity with the given id exists.
|
Map<Long,Customer> |
findAll()
Returns all instances of the type.
|
Customer |
findOne(Long id)
Retrieves an entity by its id.
|
Customer |
save(Customer customer)
Saves a given entity.
|
public Customer save(Customer customer)
CustomerRepositorysave in interface CustomerRepositorycustomer - that is savedpublic Customer findOne(Long id)
CustomerRepositoryfindOne in interface CustomerRepositoryid - must not be null.public boolean exists(Long id)
CustomerRepositoryexists in interface CustomerRepositoryid - must not be null.public Map<Long,Customer> findAll()
CustomerRepositoryfindAll in interface CustomerRepositorypublic long count()
CustomerRepositorycount in interface CustomerRepositorypublic void delete(Long id)
CustomerRepositorydelete in interface CustomerRepositoryid - must not be null.public void deleteAll()
CustomerRepositorydeleteAll in interface CustomerRepositoryCopyright © 2020. All rights reserved.