From abf2a06b9e77f876372e5ab98b0160c7451f66b2 Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Mon, 4 Aug 2014 11:47:56 +0200 Subject: [PATCH] [New] Implemented StrolchDao.hasElement() --- src/main/java/li/strolch/persistence/xml/AbstractDao.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/li/strolch/persistence/xml/AbstractDao.java b/src/main/java/li/strolch/persistence/xml/AbstractDao.java index f9a5ff32d..932fa2e1a 100644 --- a/src/main/java/li/strolch/persistence/xml/AbstractDao.java +++ b/src/main/java/li/strolch/persistence/xml/AbstractDao.java @@ -49,6 +49,12 @@ public abstract class AbstractDao implements StrolchDa return typeRef; } + @Override + public boolean hasElement(String type, String id) { + IdOfSubTypeRef ref = getIdRef(type, id); + return this.tx.getObjectDao().hasElement(ref); + } + @Override public long querySize() { long size = 0; @@ -64,7 +70,7 @@ public abstract class AbstractDao implements StrolchDa @Override public long querySize(String type) { SubTypeRef subTypeRef = getTypeRef(type); - return tx.getMetadataDao().querySize(subTypeRef); + return this.tx.getMetadataDao().querySize(subTypeRef); } @Override