branch feature/3640 created (now b82b03e)
This is an automated email from the git hooks/post-receive script. New change to branch feature/3640 in repository topia. See http://git.nuiton.org/topia.git at b82b03e Add delete(topiaId) method in TopiaDao and implement it (fixes #3640) This branch includes the following new commits: new b82b03e Add delete(topiaId) method in TopiaDao and implement it (fixes #3640) The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit b82b03e0d0cd1f1da2285a23b1037f45c4b1c444 Author: Brendan Le Ny <bleny@codelutin.com> Date: Fri Mar 13 14:33:52 2015 +0100 Add delete(topiaId) method in TopiaDao and implement it (fixes #3640) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/3640 in repository topia. See http://git.nuiton.org/topia.git commit b82b03e0d0cd1f1da2285a23b1037f45c4b1c444 Author: Brendan Le Ny <bleny@codelutin.com> Date: Fri Mar 13 14:33:52 2015 +0100 Add delete(topiaId) method in TopiaDao and implement it (fixes #3640) --- .../src/main/java/org/nuiton/topia/persistence/TopiaDao.java | 7 +++++++ .../org/nuiton/topia/persistence/internal/AbstractTopiaDao.java | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDao.java b/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDao.java index 89b0020..b8d8591 100644 --- a/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDao.java +++ b/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDao.java @@ -154,6 +154,13 @@ public interface TopiaDao<E extends TopiaEntity> extends Iterable<E> { void deleteAll(Iterable<E> entities); /** + * Deletes the entity with the given topiaId from the storage. + * + * @param topiaId the topiaId of the entity to remove + */ + void delete(String topiaId); + + /** * Finds all the entities managed by this DAO. * * @return the full list of entities in no particular diff --git a/topia-persistence/src/main/java/org/nuiton/topia/persistence/internal/AbstractTopiaDao.java b/topia-persistence/src/main/java/org/nuiton/topia/persistence/internal/AbstractTopiaDao.java index 4071931..c6cdb74 100644 --- a/topia-persistence/src/main/java/org/nuiton/topia/persistence/internal/AbstractTopiaDao.java +++ b/topia-persistence/src/main/java/org/nuiton/topia/persistence/internal/AbstractTopiaDao.java @@ -33,7 +33,6 @@ import com.google.common.collect.Iterables; import com.google.common.collect.Iterators; import com.google.common.collect.Lists; import com.google.common.collect.Maps; - import org.apache.commons.beanutils.PropertyUtils; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -75,7 +74,6 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.NoSuchElementException; -import java.util.Set; /** * This class has the common methods usable for each Dao managed by Topia. It is not JPA implementation dependent, it @@ -365,6 +363,12 @@ public abstract class AbstractTopiaDao<E extends TopiaEntity> implements TopiaDa } } + @Override + public void delete(String topiaId) { + E entity = forTopiaIdEquals(topiaId).findUnique(); + delete(entity); + } + protected HqlAndParametersBuilder<E> newHqlAndParametersBuilder() { HqlAndParametersBuilder<E> result = new HqlAndParametersBuilder<E>(getEntityClass()); return result; -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm