public class DefaultCrudRepository extends CrudRepositorySupport
This class will provide implementations for the methods introduced by the Spring framework through
CrudRepository.
| Constructor and Description |
|---|
DefaultCrudRepository() |
| Modifier and Type | Method and Description |
|---|---|
Iterable |
delete(Iterable entities)
Deletes all specified entities from the data store.
|
Object |
delete(Object entity)
Deletes the entity matching this entity's key from the data store
|
Object |
delete(Serializable id)
Deletes the entity with the given id and returns the actual entity that was just deleted.
|
Iterable |
deleteAll()
Deletes everything from the data store
|
boolean |
exists(Serializable key)
Checks whether the given key represents an entity in the data store
|
Iterable |
findAll(Iterable ids)
Finds all the entities that match the given set of ids
|
Object |
findOne(Serializable key)
Finds the entity that was saved with this key, or returns null
|
Iterable<Object> |
save(Iterable entities)
Saves all the given entities
|
getDataStore, getKeyGenerator, getRepositoryMetadata, save, setDataStore, setKeyGenerator, setRepositoryMetadatapublic Iterable<Object> save(Iterable entities)
entities - entities to save (insert or update)public Object findOne(Serializable key)
key - the keypublic boolean exists(Serializable key)
key - the keypublic Iterable findAll(Iterable ids)
ids - ids to look forpublic Object delete(Serializable id)
id - the idpublic Object delete(Object entity)
entity - the entityEntityMissingKeyException - if the passed entity doesn't have a keypublic Iterable delete(Iterable entities)
entities - the entities to deletepublic Iterable deleteAll()
Copyright © 2014–2016. All rights reserved.