From 0442778195bbf9ed1f8904963e41ea2877354e7d Mon Sep 17 00:00:00 2001 From: tpylak <tpylak> Date: Mon, 10 May 2010 08:56:07 +0000 Subject: [PATCH] minor: move the method SVN: 15857 --- .../ch/systemsx/cisd/yeastx/db/DBUtils.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/rtd_yeastx/source/java/ch/systemsx/cisd/yeastx/db/DBUtils.java b/rtd_yeastx/source/java/ch/systemsx/cisd/yeastx/db/DBUtils.java index 4c11d14d03c..1c7b4a06d4e 100644 --- a/rtd_yeastx/source/java/ch/systemsx/cisd/yeastx/db/DBUtils.java +++ b/rtd_yeastx/source/java/ch/systemsx/cisd/yeastx/db/DBUtils.java @@ -37,6 +37,16 @@ public class DBUtils QueryTool.getTypeMap().put(float[].class, new FloatArrayMapper()); } + /** + * Use this method instead of {@link QueryTool#getQuery(DataSource, Class)}. Only in this way + * you make sure that the rigth query mappers will be registered. + */ + public static <T extends BaseQuery> T getQuery(final DataSource dataSource, final Class<T> query) + throws InvalidDataTypeException, InvalidQueryException + { + return QueryTool.getQuery(dataSource, query); + } + /** * Rolls backs and closes the given <var>transactionOrNull</var>, if it is not <code>null</code> * . @@ -138,13 +148,4 @@ public class DBUtils return experiment; } - /** - * Use this method instead of {@link QueryTool#getQuery(DataSource, Class)} to initialize the - * {@link QueryTool#getTypeMap()}. - */ - public static <T extends BaseQuery> T getQuery(final DataSource dataSource, final Class<T> query) - throws InvalidDataTypeException, InvalidQueryException - { - return QueryTool.getQuery(dataSource, query); - } } -- GitLab