mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
added on-demand database cleanup (date is hardcoded for the moment)
This commit is contained in:
@@ -50,15 +50,15 @@ public abstract class GenericDAO<T extends AbstractModel> {
|
||||
saveOrUpdate(Arrays.asList(models));
|
||||
}
|
||||
|
||||
public void delete(T object) {
|
||||
public void delete(AbstractModel object) {
|
||||
if (object != null) {
|
||||
object = em.merge(object);
|
||||
em.remove(object);
|
||||
}
|
||||
}
|
||||
|
||||
public void delete(List<T> objects) {
|
||||
for (T object : objects) {
|
||||
public void delete(Collection<? extends AbstractModel> objects) {
|
||||
for (AbstractModel object : objects) {
|
||||
delete(object);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user