From 45189a5bc35751f9df94669098102073cc8fe6a6 Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Tue, 5 Mar 2019 17:57:59 +0100 Subject: [PATCH] [Major] Extended StrolchDao with paging feature --- .../strolch/persistence/api/StrolchDao.java | 106 ++++++++++----- .../postgresql/PostgreSqlActivityDao.java | 18 +-- .../postgresql/PostgreSqlOrderDao.java | 18 +-- .../postgresql/PostgreSqlResourceDao.java | 18 +-- .../persistence/postgresql/PostgresqlDao.java | 127 ++++++++++++------ .../strolch/persistence/xml/AbstractDao.java | 52 ++++++- 6 files changed, 209 insertions(+), 130 deletions(-) diff --git a/li.strolch.agent/src/main/java/li/strolch/persistence/api/StrolchDao.java b/li.strolch.agent/src/main/java/li/strolch/persistence/api/StrolchDao.java index a16a61800..1bd71ec60 100644 --- a/li.strolch.agent/src/main/java/li/strolch/persistence/api/StrolchDao.java +++ b/li.strolch.agent/src/main/java/li/strolch/persistence/api/StrolchDao.java @@ -39,19 +39,29 @@ import li.strolch.model.StrolchRootElement; */ public interface StrolchDao { + /** + * Returns true if this {@link StrolchDao} supports paging, i.e. the methods with a limit and offset may be used + * + * @return true if this {@link StrolchDao} supports paging, i.e. the methods with a limit and offset may be used + */ + boolean supportsPaging(); + /** * Returns the number of elements in the underlying persistence layer, regardless of type * * @return the number of elements in the underlying persistence layer */ - public long querySize(); + long querySize(); /** - * Returns the number of elements in the underlying persistence layer for the given type + * Returns the number of elements in the underlying persistence layer for the given type(s) * - * @return the number of elements in the underlying persistence layer for the given type + * @param types + * the type(s) to query the size for + * + * @return the number of elements in the underlying persistence layer for the given type(s) */ - public long querySize(String type); + long querySize(String... types); /** * Queries the current list of types from the underlying persistence layer @@ -61,20 +71,62 @@ public interface StrolchDao { * @throws StrolchPersistenceException * if something goes wrong */ - public Set queryTypes() throws StrolchPersistenceException; + Set queryTypes() throws StrolchPersistenceException; + + /** + * Queries and returns all elements regardless of type + * + * @return all elements regardless of type + * + * @throws StrolchPersistenceException + * if something goes wrong + */ + List queryAll() throws StrolchPersistenceException; + + /** + * Queries and returns all elements regardless of type + * + * @param limit + * the max amount, or @{@link Integer#MAX_VALUE} for all + * @param offset + * if max amount defined, then the offset to start from + * + * @return all elements regardless of type + * + * @throws StrolchPersistenceException + * if something goes wrong + */ + List queryAll(long limit, long offset) throws StrolchPersistenceException; /** * Queries and returns all elements of the given type * - * @param type - * the type of element to return + * @param types + * the type(s) of element(s) to return * * @return all elements of the given type * * @throws StrolchPersistenceException * if something goes wrong */ - public List queryAll(String type) throws StrolchPersistenceException; + List queryAll(String... types) throws StrolchPersistenceException; + + /** + * Queries and returns all elements of the given type + * + * @param limit + * the max amount, or @{@link Integer#MAX_VALUE} for all + * @param offset + * if max amount defined, then the offset to start from + * @param types + * the type(s) of element(s) to return + * + * @return all elements of the given type + * + * @throws StrolchPersistenceException + * if something goes wrong + */ + List queryAll(long limit, long offset, String... types) throws StrolchPersistenceException; /** * Persists the given element. The element must not yet exist @@ -85,7 +137,7 @@ public interface StrolchDao { * @throws StrolchPersistenceException * if the element already exists */ - public void save(T element) throws StrolchPersistenceException; + void save(T element) throws StrolchPersistenceException; /** * Persists the given list of elements. None of the elements may already exists @@ -96,7 +148,7 @@ public interface StrolchDao { * @throws StrolchPersistenceException * if any of the elements already exist */ - public void saveAll(List elements) throws StrolchPersistenceException; + void saveAll(List elements) throws StrolchPersistenceException; /** * Updates the given element. The element must already exist @@ -107,7 +159,7 @@ public interface StrolchDao { * @throws StrolchPersistenceException * if the element does not exist */ - public void update(T element) throws StrolchPersistenceException; + void update(T element) throws StrolchPersistenceException; /** * Updates the given list of elements. Each element must already exist @@ -118,7 +170,7 @@ public interface StrolchDao { * @throws StrolchPersistenceException * if any of the elements do not exist */ - public void updateAll(List elements) throws StrolchPersistenceException; + void updateAll(List elements) throws StrolchPersistenceException; /** *

@@ -136,7 +188,7 @@ public interface StrolchDao { * @throws StrolchPersistenceException * if the element does not exist */ - public void remove(T element) throws StrolchPersistenceException; + void remove(T element) throws StrolchPersistenceException; /** *

@@ -154,7 +206,7 @@ public interface StrolchDao { * @throws StrolchPersistenceException * if any of the elements do not exist */ - public void removeAll(List elements) throws StrolchPersistenceException; + void removeAll(List elements) throws StrolchPersistenceException; /** *

@@ -171,7 +223,7 @@ public interface StrolchDao { * @throws StrolchPersistenceException * if something goes wrong */ - public long removeAll() throws StrolchPersistenceException; + long removeAll() throws StrolchPersistenceException; /** *

@@ -191,7 +243,7 @@ public interface StrolchDao { * @throws StrolchPersistenceException * if something goes wrong */ - public long removeAllBy(String type) throws StrolchPersistenceException; + long removeAllBy(String type) throws StrolchPersistenceException; /** *

@@ -214,7 +266,7 @@ public interface StrolchDao { * @throws StrolchPersistenceException * if something goes wrong */ - public T queryBy(String type, String id, int version) throws StrolchPersistenceException; + T queryBy(String type, String id, int version) throws StrolchPersistenceException; /** * Queries and returns all the versions of the element with the given type and ID @@ -229,7 +281,7 @@ public interface StrolchDao { * @throws StrolchPersistenceException * if something goes wrong */ - public List queryVersionsFor(String type, String id) throws StrolchPersistenceException; + List queryVersionsFor(String type, String id) throws StrolchPersistenceException; /** * Queries and returns the latest version of the element with the given type and ID, -1 if no version available @@ -244,7 +296,7 @@ public interface StrolchDao { * @throws StrolchPersistenceException * if something goes wrong */ - public int queryLatestVersionFor(String type, String id) throws StrolchPersistenceException; + int queryLatestVersionFor(String type, String id) throws StrolchPersistenceException; /** * Queries and returns the number of versions for the element with the given type and ID @@ -259,17 +311,7 @@ public interface StrolchDao { * @throws StrolchPersistenceException * if something goes wrong */ - public long queryVersionsSizeFor(String type, String id) throws StrolchPersistenceException; - - /** - * Queries and returns all elements regardless of type - * - * @return all elements regardless of type - * - * @throws StrolchPersistenceException - * if something goes wrong - */ - public List queryAll() throws StrolchPersistenceException; + long queryVersionsSizeFor(String type, String id) throws StrolchPersistenceException; /** *

@@ -288,7 +330,7 @@ public interface StrolchDao { * @throws StrolchPersistenceException * if the element/version does not exist */ - public void removeVersion(T element) throws StrolchPersistenceException; + void removeVersion(T element) throws StrolchPersistenceException; /** * Causes the DAO to flush any actions which have not yet been sent to the underlying persistence layer @@ -296,5 +338,5 @@ public interface StrolchDao { * @throws StrolchPersistenceException * if something goes wrong */ - public void flush() throws StrolchPersistenceException; + void flush() throws StrolchPersistenceException; } diff --git a/li.strolch.persistence.postgresql/src/main/java/li/strolch/persistence/postgresql/PostgreSqlActivityDao.java b/li.strolch.persistence.postgresql/src/main/java/li/strolch/persistence/postgresql/PostgreSqlActivityDao.java index 4482904a9..57980bfd9 100644 --- a/li.strolch.persistence.postgresql/src/main/java/li/strolch/persistence/postgresql/PostgreSqlActivityDao.java +++ b/li.strolch.persistence.postgresql/src/main/java/li/strolch/persistence/postgresql/PostgreSqlActivityDao.java @@ -94,14 +94,7 @@ public class PostgreSqlActivityDao extends PostgresqlDao implements Ac @Override protected void internalSave(final Activity activity) { - String sql; - if (this.dataType == DataType.xml) - sql = insertAsXmlSqlS; - else if (this.dataType == DataType.json) - sql = insertAsJsonSqlS; - else - throw new IllegalStateException("Unhandled DataType " + this.dataType); - sql = MessageFormat.format(sql, getTableName()); + String sql = getSql(insertAsXmlSqlS, insertAsJsonSqlS); try (PreparedStatement preparedStatement = this.connection.prepareStatement(sql)) { @@ -193,14 +186,7 @@ public class PostgreSqlActivityDao extends PostgresqlDao implements Ac activity.getVersion())); } - String sql; - if (this.dataType == DataType.xml) - sql = updateAsXmlSqlS; - else if (this.dataType == DataType.json) - sql = updateAsJsonSqlS; - else - throw new IllegalStateException("Unhandled DataType " + this.dataType); - sql = MessageFormat.format(sql, getTableName()); + String sql = getSql(updateAsXmlSqlS, updateAsJsonSqlS); try (PreparedStatement preparedStatement = this.connection.prepareStatement(sql)) { diff --git a/li.strolch.persistence.postgresql/src/main/java/li/strolch/persistence/postgresql/PostgreSqlOrderDao.java b/li.strolch.persistence.postgresql/src/main/java/li/strolch/persistence/postgresql/PostgreSqlOrderDao.java index 1a3c70efa..fbc8a8212 100644 --- a/li.strolch.persistence.postgresql/src/main/java/li/strolch/persistence/postgresql/PostgreSqlOrderDao.java +++ b/li.strolch.persistence.postgresql/src/main/java/li/strolch/persistence/postgresql/PostgreSqlOrderDao.java @@ -94,14 +94,7 @@ public class PostgreSqlOrderDao extends PostgresqlDao implements OrderDao @Override protected void internalSave(final Order order) { - String sql; - if (this.dataType == DataType.xml) - sql = insertAsXmlSqlS; - else if (this.dataType == DataType.json) - sql = insertAsJsonSqlS; - else - throw new IllegalStateException("Unhandled DataType " + this.dataType); - sql = MessageFormat.format(sql, getTableName()); + String sql = getSql(insertAsXmlSqlS, insertAsJsonSqlS); try (PreparedStatement preparedStatement = this.connection.prepareStatement(sql)) { @@ -193,14 +186,7 @@ public class PostgreSqlOrderDao extends PostgresqlDao implements OrderDao order.getVersion())); } - String sql; - if (this.dataType == DataType.xml) - sql = updateAsXmlSqlS; - else if (this.dataType == DataType.json) - sql = updateAsJsonSqlS; - else - throw new IllegalStateException("Unhandled DataType " + this.dataType); - sql = MessageFormat.format(sql, getTableName()); + String sql = getSql(updateAsXmlSqlS, updateAsJsonSqlS); // now we update the existing object try (PreparedStatement preparedStatement = this.connection.prepareStatement(sql)) { diff --git a/li.strolch.persistence.postgresql/src/main/java/li/strolch/persistence/postgresql/PostgreSqlResourceDao.java b/li.strolch.persistence.postgresql/src/main/java/li/strolch/persistence/postgresql/PostgreSqlResourceDao.java index f14e1c1aa..08612958b 100644 --- a/li.strolch.persistence.postgresql/src/main/java/li/strolch/persistence/postgresql/PostgreSqlResourceDao.java +++ b/li.strolch.persistence.postgresql/src/main/java/li/strolch/persistence/postgresql/PostgreSqlResourceDao.java @@ -94,14 +94,7 @@ public class PostgreSqlResourceDao extends PostgresqlDao implements Re @Override protected void internalSave(final Resource resource) { - String sql; - if (this.dataType == DataType.xml) - sql = insertAsXmlSqlS; - else if (this.dataType == DataType.json) - sql = insertAsJsonSqlS; - else - throw new IllegalStateException("Unhandled DataType " + this.dataType); - sql = MessageFormat.format(sql, getTableName()); + String sql = getSql(insertAsXmlSqlS, insertAsJsonSqlS); try (PreparedStatement preparedStatement = this.connection.prepareStatement(sql)) { @@ -193,14 +186,7 @@ public class PostgreSqlResourceDao extends PostgresqlDao implements Re } // now we update the existing object - String sql; - if (this.dataType == DataType.xml) - sql = updateAsXmlSqlS; - else if (this.dataType == DataType.json) - sql = updateAsJsonSqlS; - else - throw new IllegalStateException("Unhandled DataType " + this.dataType); - sql = MessageFormat.format(sql, getTableName()); + String sql = getSql(updateAsXmlSqlS, updateAsJsonSqlS); try (PreparedStatement preparedStatement = this.connection.prepareStatement(sql)) { diff --git a/li.strolch.persistence.postgresql/src/main/java/li/strolch/persistence/postgresql/PostgresqlDao.java b/li.strolch.persistence.postgresql/src/main/java/li/strolch/persistence/postgresql/PostgresqlDao.java index 4d64efa90..98580aeae 100644 --- a/li.strolch.persistence.postgresql/src/main/java/li/strolch/persistence/postgresql/PostgresqlDao.java +++ b/li.strolch.persistence.postgresql/src/main/java/li/strolch/persistence/postgresql/PostgresqlDao.java @@ -33,29 +33,37 @@ import org.postgresql.util.PGobject; import org.xml.sax.ContentHandler; import org.xml.sax.SAXException; -@SuppressWarnings("nls") public abstract class PostgresqlDao implements StrolchDao { private static final String querySizeSqlS = "select count(*) from {0} where latest = true"; - private static final String querySizeOfTypeSqlS = "select count(*) from {0} where type = ? and latest = true"; + private static final String querySizeOfTypeSqlS = "select count(*) from {0} where type = ANY(?) and latest = true"; private static final String querySizeOfElementSqlS = "select count(*) from {0} where type = ? and id = ?"; private static final String queryTypesSqlS = "select distinct type from {0} where latest = true"; private static final String queryLatestVersionNumberForSqlS = "select count(*), max(version) from {0} where type = ? and id = ?"; private static final String queryVersionsSizeForSqlS = "select count(*) from {0} where type = ? and id = ?"; + + private static final String updateLatestSqlS = "update {0} set latest = true where type = ? and id = ? and version = ?"; + private static final String deleteElementSqlS = "delete from {0} where id = ?"; private static final String deleteVersionSqlS = "delete from {0} where type = ? and id = ? and version = ? and latest = true"; - private static final String updateLatestSqlS = "update {0} set latest = true where type = ? and id = ? and version = ?"; private static final String deleteAllSqlS = "delete from {0}"; private static final String deleteAllByTypeSqlS = "delete from {0} where type = ?"; private static final String queryByVersionAsXmlSqlS = "select version, asxml from {0} where type = ? and id = ? and version = ?"; private static final String queryByVersionAsJsonSqlS = "select version, asjson from {0} where type = ? and id = ? and version = ?"; + private static final String queryVersionsAsXmlForSqlS = "select asxml from {0} where type = ? and id = ? order by version"; private static final String queryVersionsAsJsonForSqlS = "select asjson from {0} where type = ? and id = ? order by version"; + private static final String queryAllAsXmlSqlS = "select id, type, asxml from {0} where latest = true"; + private static final String queryAllAsXmlLimitSqlS = "select id, type, asxml from {0} where latest = true order by id limit {1} offset {2}"; private static final String queryAllAsJsonSqlS = "select id, type, asjson from {0} where latest = true"; - private static final String queryAllByTypeAsXmlSqlS = "select id, asxml from {0} where type = ? and latest = true"; - private static final String queryAllByTypeAsJsonSqlS = "select id, asjson from {0} where type = ? and latest = true"; + private static final String queryAllAsJsonLimitSqlS = "select id, type, asjson from {0} where latest = true order by id limit {1} offset {2}"; + + private static final String queryAllByTypeAsXmlSqlS = "select id, type, asxml from {0} where type = ANY(?) and latest = true"; + private static final String queryAllByTypeAsXmlLimitSqlS = "select id, type, asxml from {0} where type = ANY(?) and latest = true order by id limit {1} offset {2}"; + private static final String queryAllByTypeAsJsonSqlS = "select id, type, asjson from {0} where type = ANY(?) and latest = true"; + private static final String queryAllByTypeAsJsonLimitSqlS = "select id, type, asjson from {0} where type = ANY(?) and latest = true order by id limit {1} offset {2}"; protected final DataType dataType; protected Connection connection; @@ -72,6 +80,11 @@ public abstract class PostgresqlDao implements Str this.commands = new ArrayList<>(); } + @Override + public boolean supportsPaging() { + return true; + } + public DataType getDataType() { return this.dataType; } @@ -144,10 +157,16 @@ public abstract class PostgresqlDao implements Str } @Override - public long querySize(String type) { + public long querySize(String... types) { + if (types.length == 0) + return querySize(); + String sql = MessageFormat.format(querySizeOfTypeSqlS, getTableName()); + try (PreparedStatement statement = this.connection.prepareStatement(sql)) { - statement.setString(1, type); + + Array typesArray = statement.getConnection().createArrayOf("varchar", types); + statement.setArray(1, typesArray); try (ResultSet result = statement.executeQuery()) { result.next(); @@ -161,9 +180,10 @@ public abstract class PostgresqlDao implements Str @Override public Set queryTypes() { - Set keySet = new HashSet<>(); String sql = MessageFormat.format(queryTypesSqlS, getTableName()); + + Set keySet = new HashSet<>(); try (PreparedStatement statement = this.connection.prepareStatement(sql)) { try (ResultSet result = statement.executeQuery()) { @@ -182,14 +202,7 @@ public abstract class PostgresqlDao implements Str @Override public T queryBy(String type, String id, int versionNr) { - String sql; - if (this.dataType == DataType.xml) - sql = queryByVersionAsXmlSqlS; - else if (this.dataType == DataType.json) - sql = queryByVersionAsJsonSqlS; - else - throw new IllegalStateException("Unhandled DataType " + this.dataType); - sql = MessageFormat.format(sql, getTableName()); + String sql = getSql(queryByVersionAsXmlSqlS, queryByVersionAsJsonSqlS); try (PreparedStatement statement = this.connection.prepareStatement(sql)) { statement.setString(1, type); @@ -220,17 +233,9 @@ public abstract class PostgresqlDao implements Str @Override public List queryVersionsFor(String type, String id) { + String sql = getSql(queryVersionsAsXmlForSqlS, queryVersionsAsJsonForSqlS); + List list = new ArrayList<>(1); - - String sql; - if (this.dataType == DataType.xml) - sql = queryVersionsAsXmlForSqlS; - else if (this.dataType == DataType.json) - sql = queryVersionsAsJsonForSqlS; - else - throw new IllegalStateException("Unhandled DataType " + this.dataType); - sql = MessageFormat.format(sql, getTableName()); - try (PreparedStatement statement = this.connection.prepareStatement(sql)) { statement.setString(1, type); statement.setString(2, id); @@ -296,17 +301,16 @@ public abstract class PostgresqlDao implements Str @Override public List queryAll() { + return queryAll(Integer.MAX_VALUE, 0); + } + + @Override + public List queryAll(long limit, long offset) { List list = new ArrayList<>(); - String sql; - if (this.dataType == DataType.xml) - sql = queryAllAsXmlSqlS; - else if (this.dataType == DataType.json) - sql = queryAllAsJsonSqlS; - else - throw new IllegalStateException("Unhandled DataType " + this.dataType); - sql = MessageFormat.format(sql, getTableName()); + String sql = getLimitSql(limit, offset, queryAllAsXmlSqlS, queryAllAsJsonSqlS, queryAllAsXmlLimitSqlS, + queryAllAsJsonLimitSqlS); try (PreparedStatement statement = this.connection.prepareStatement(sql)) { @@ -326,25 +330,29 @@ public abstract class PostgresqlDao implements Str } @Override - public List queryAll(String type) { + public List queryAll(String... types) { + return queryAll(Integer.MAX_VALUE, 0, types); + } + + @Override + public List queryAll(long limit, long offset, String... types) { + if (types.length == 0) + return queryAll(limit, offset); List list = new ArrayList<>(); - String sql; - if (this.dataType == DataType.xml) - sql = queryAllByTypeAsXmlSqlS; - else if (this.dataType == DataType.json) - sql = queryAllByTypeAsJsonSqlS; - else - throw new IllegalStateException("Unhandled DataType " + this.dataType); - sql = MessageFormat.format(sql, getTableName()); + String sql = getLimitSql(limit, offset, queryAllByTypeAsXmlSqlS, queryAllByTypeAsJsonSqlS, + queryAllByTypeAsXmlLimitSqlS, queryAllByTypeAsJsonLimitSqlS); try (PreparedStatement statement = this.connection.prepareStatement(sql)) { - statement.setString(1, type); + + Array typesArray = statement.getConnection().createArrayOf("varchar", types); + statement.setArray(1, typesArray); try (ResultSet result = statement.executeQuery()) { while (result.next()) { String id = result.getString("id"); + String type = result.getString("type"); list.add(parseDbObject(result, id, type)); } @@ -356,6 +364,37 @@ public abstract class PostgresqlDao implements Str } } + protected String getLimitSql(long limit, long offset, String xmlSql, String jsonSql, String xmlLimitSql, + String jsonLimitSql) { + + String sql; + if (limit == Integer.MAX_VALUE) { + return getSql(xmlSql, jsonSql); + } + + if (this.dataType == DataType.xml) + sql = xmlLimitSql; + else if (this.dataType == DataType.json) + sql = jsonLimitSql; + else + throw new IllegalStateException("Unhandled DataType " + this.dataType); + + return MessageFormat.format(sql, getTableName(), limit, offset); + } + + protected String getSql(String xmlSql, String jsonSql) { + + String sql; + if (this.dataType == DataType.xml) + sql = xmlSql; + else if (this.dataType == DataType.json) + sql = jsonSql; + else + throw new IllegalStateException("Unhandled DataType " + this.dataType); + + return MessageFormat.format(sql, getTableName()); + } + @Override public void save(T res) { this.commands.add(txResult -> { diff --git a/li.strolch.persistence.xml/src/main/java/li/strolch/persistence/xml/AbstractDao.java b/li.strolch.persistence.xml/src/main/java/li/strolch/persistence/xml/AbstractDao.java index 9b823a550..47fab3290 100644 --- a/li.strolch.persistence.xml/src/main/java/li/strolch/persistence/xml/AbstractDao.java +++ b/li.strolch.persistence.xml/src/main/java/li/strolch/persistence/xml/AbstractDao.java @@ -37,6 +37,11 @@ public abstract class AbstractDao implements Strol this.tx = strolchTx.getTx(); } + @Override + public boolean supportsPaging() { + return false; + } + protected abstract String getClassType(); protected IdOfSubTypeRef getIdRef(String type, String id) { @@ -52,7 +57,6 @@ public abstract class AbstractDao implements Strol long size = 0; Set types = queryTypes(); for (String type : types) { - SubTypeRef subTypeRef = getTypeRef(type); size += this.tx.getMetadataDao().querySize(subTypeRef); } @@ -60,9 +64,23 @@ public abstract class AbstractDao implements Strol } @Override - public long querySize(String type) { - SubTypeRef subTypeRef = getTypeRef(type); - return this.tx.getMetadataDao().querySize(subTypeRef); + public long querySize(String... types) { + + if (types.length == 0) + return querySize(); + + if (types.length == 1) { + SubTypeRef subTypeRef = getTypeRef(types[0]); + return this.tx.getMetadataDao().querySize(subTypeRef); + } + + int size = 0; + for (String type : types) { + SubTypeRef subTypeRef = getTypeRef(type); + size += this.tx.getMetadataDao().querySize(subTypeRef); + } + + return size; } @Override @@ -84,8 +102,20 @@ public abstract class AbstractDao implements Strol } @Override - public List queryAll(String type) { - return this.tx.getObjectDao().queryAll(getTypeRef(type)); + public List queryAll(String... types) { + if (types.length == 0) + return queryAll(); + + if (types.length == 1) { + return this.tx.getObjectDao().queryAll(getTypeRef(types[0])); + } + + List objects = new ArrayList<>(); + for (String type : types) { + objects.addAll(this.tx.getObjectDao().queryAll(getTypeRef(type))); + } + + return objects; } @Override @@ -135,6 +165,16 @@ public abstract class AbstractDao implements Strol // nothing to do } + @Override + public List queryAll(long limit, long offset) throws StrolchPersistenceException { + throw new UnsupportedOperationException("Paging not supported! Check first with supportsPaging()"); + } + + @Override + public List queryAll(long limit, long offset, String... types) throws StrolchPersistenceException { + throw new UnsupportedOperationException("Paging not supported! Check first with supportsPaging()"); + } + @Override public void removeVersion(T element) throws StrolchPersistenceException { throw new UnsupportedOperationException("Versioning is not supported!");