Skip to content

Commit

Permalink
Fix javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
BLACKLEG committed Feb 5, 2017
1 parent 134b8a0 commit 46a437c
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public class DefaultCrudRepository extends CrudRepositorySupport {

/**
* Saves all the given entities
*
* @param entities entities to save (insert or update)
* @return saved entities
*/
Expand All @@ -42,7 +41,6 @@ public Iterable<Object> save(Iterable entities) {

/**
* Finds the entity that was saved with this key, or returns {@literal null}
*
* @param key the key
* @return the entity
*/
Expand All @@ -53,7 +51,6 @@ public Object findOne(Serializable key) {

/**
* Checks whether the given key represents an entity in the data store
*
* @param key the key
* @return {@literal true} if the key is valid
*/
Expand All @@ -63,7 +60,6 @@ public boolean exists(Serializable key) {

/**
* Finds all the entities that match the given set of ids
*
* @param ids ids to look for
* @return entities that matched the ids.
*/
Expand All @@ -84,15 +80,14 @@ public Iterable findAll(Iterable ids) {
/**
* Deletes the entity with the given id and returns the actual entity that
* was just deleted.
*
* @param id the id
* @return the entity that was deleted or {@literal null} if it wasn't found
*/
public Object delete(Serializable id) {
Object retrieved = getDataStore().retrieve(id);
log.info("Attempting to delete the entity with key " + id);
if (retrieved == null) {
log.info("Object not found with key " + id + ", try to find by identyfier property");
log.info("Object not found with key " + id + ", try to find by identifier property");
try {
id = (Serializable) PropertyUtils.getPropertyValue(id, getRepositoryMetadata().getIdentifierProperty());
retrieved = getDataStore().retrieve(id);
Expand All @@ -106,7 +101,6 @@ public Object delete(Serializable id) {

/**
* Deletes the entity matching this entity's key from the data store
*
* @param entity the entity
* @return the deleted entity
* @throws EntityMissingKeyException if the passed entity doesn't have a key
Expand All @@ -122,7 +116,6 @@ public Object delete(Object entity) {

/**
* Deletes all specified <em>entities</em> from the data store.
*
* @param entities the entities to delete
* @return the entities that were actually deleted
*/
Expand All @@ -142,7 +135,6 @@ public Iterable delete(Iterable entities) {

/**
* Deletes everything from the data store
*
* @return all the entities that were removed
*/
public Iterable deleteAll() {
Expand Down

0 comments on commit 46a437c

Please sign in to comment.