public interface CustomerRepository
| 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.
|
<S extends Customer> |
save(S entity)
Saves a given entity.
|
<S extends Customer> S save(S entity)
S - the generic typeentity - that is savedCustomer findOne(Long id)
id - must not be null.IllegalArgumentException - if id is nullboolean exists(Long id)
id - must not be null.IllegalArgumentException - if id is nulllong count()
void delete(Long id)
id - must not be null.IllegalArgumentException - in case the given id is nullvoid deleteAll()
Copyright © 2020. All rights reserved.