From c84ffd215cdc53e55f3dbc234c5ec8d5f2df3d88 Mon Sep 17 00:00:00 2001
From: tpylak <tpylak>
Date: Tue, 17 Feb 2009 13:34:43 +0000
Subject: [PATCH] LMS-749 minor: extract inner classes, add javadoc

SVN: 9855
---
 .../model/DataSetSearchFieldComboModel.java   |   2 +-
 .../application/ui/data/CriterionWidget.java  |   2 +-
 .../DataSetSearchFieldsSelectionWidget.java   |   4 +-
 .../db/search/LuceneQueryBuilder.java         |   4 +-
 .../basic/dto/DataSetSearchCriterion.java     | 180 ------------------
 .../shared/basic/dto/DataSetSearchField.java  | 135 +++++++++++++
 .../basic/dto/DataSetSearchFieldKind.java     |  99 ++++++++++
 .../client/application/DataSetSearchTest.java |   2 +-
 .../ui/data/FillSearchCriteria.java           |   2 +-
 .../dataaccess/db/HibernateSearchDAOTest.java |   4 +-
 10 files changed, 244 insertions(+), 190 deletions(-)
 create mode 100644 openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSetSearchField.java
 create mode 100644 openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSetSearchFieldKind.java

diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/DataSetSearchFieldComboModel.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/DataSetSearchFieldComboModel.java
index 21f0100d370..f2de744cd68 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/DataSetSearchFieldComboModel.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/DataSetSearchFieldComboModel.java
@@ -18,7 +18,7 @@ package ch.systemsx.cisd.openbis.generic.client.web.client.application.model;
 
 import com.extjs.gxt.ui.client.data.BaseModelData;
 
-import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchCriterion.DataSetSearchField;
+import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchField;
 
 public class DataSetSearchFieldComboModel extends BaseModelData
 {
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/CriterionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/CriterionWidget.java
index 81121553ad6..919dbd5108c 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/CriterionWidget.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/CriterionWidget.java
@@ -32,8 +32,8 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.GenericCon
 import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext;
 import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.StringUtils;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchCriterion;
+import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchField;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.PropertyType;
-import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchCriterion.DataSetSearchField;
 
 /**
  * Allows to specify one criterion.
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetSearchFieldsSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetSearchFieldsSelectionWidget.java
index e4f7e3c2fa7..73804727c2f 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetSearchFieldsSelectionWidget.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetSearchFieldsSelectionWidget.java
@@ -33,9 +33,9 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.sample.
 import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils;
 import ch.systemsx.cisd.openbis.generic.client.web.client.dto.DefaultResultSetConfig;
 import ch.systemsx.cisd.openbis.generic.client.web.client.dto.ResultSet;
+import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchField;
+import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchFieldKind;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.PropertyType;
-import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchCriterion.DataSetSearchField;
-import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchCriterion.DataSetSearchFieldKind;
 
 /**
  * {@link ComboBox} containing list of search fields loaded from the server (property types) and
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/LuceneQueryBuilder.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/LuceneQueryBuilder.java
index 16967fec02f..0e4a305dc05 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/LuceneQueryBuilder.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/LuceneQueryBuilder.java
@@ -41,9 +41,9 @@ import ch.systemsx.cisd.common.exceptions.UserFailureException;
 import ch.systemsx.cisd.common.logging.LogCategory;
 import ch.systemsx.cisd.common.logging.LogFactory;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchCriterion;
+import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchField;
+import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchFieldKind;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.SearchCriteria;
-import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchCriterion.DataSetSearchField;
-import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchCriterion.DataSetSearchFieldKind;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.SearchCriteria.CriteriaConnection;
 import ch.systemsx.cisd.openbis.generic.shared.dto.hibernate.SearchFieldConstants;
 
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSetSearchCriterion.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSetSearchCriterion.java
index 0895311fe90..6afa0ed55e2 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSetSearchCriterion.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSetSearchCriterion.java
@@ -16,8 +16,6 @@
 
 package ch.systemsx.cisd.openbis.generic.shared.basic.dto;
 
-import java.util.ArrayList;
-import java.util.List;
 
 import com.google.gwt.user.client.rpc.IsSerializable;
 
@@ -30,184 +28,6 @@ public class DataSetSearchCriterion implements IsSerializable
 
     private String value;
 
-    public static class DataSetSearchField implements IsSerializable
-    {
-        private DataSetSearchFieldKind kind;
-
-        private String propertyCodeOrNull;
-
-        private List<String> allExperimentPropertyCodesOrNull;
-
-        private List<String> allSamplePropertyCodesOrNull;
-
-        public static DataSetSearchField createAnyField(List<String> allExperimentPropertyCodes,
-                List<String> allSamplePropertyCodes)
-        {
-            return new DataSetSearchField(DataSetSearchFieldKind.ANY_FIELD, null,
-                    allExperimentPropertyCodes, allSamplePropertyCodes);
-        }
-
-        public static DataSetSearchField createAnyExperimentProperty(
-                List<String> allExperimentPropertyCodes)
-        {
-            return new DataSetSearchField(DataSetSearchFieldKind.ANY_EXPERIMENT_PROPERTY, null,
-                    allExperimentPropertyCodes, null);
-        }
-
-        public static DataSetSearchField createAnySampleProperty(List<String> allSamplePropertyCodes)
-        {
-            return new DataSetSearchField(DataSetSearchFieldKind.ANY_SAMPLE_PROPERTY, null, null,
-                    allSamplePropertyCodes);
-        }
-
-        public static DataSetSearchField createExperimentProperty(String propertyCode)
-        {
-            return new DataSetSearchField(DataSetSearchFieldKind.EXPERIMENT_PROPERTY, propertyCode);
-        }
-
-        public static DataSetSearchField createSampleProperty(String propertyCode)
-        {
-            return new DataSetSearchField(DataSetSearchFieldKind.SAMPLE_PROPERTY, propertyCode);
-        }
-
-        public static DataSetSearchField createSimpleField(DataSetSearchFieldKind fieldKind)
-        {
-            assert fieldKind.isComplex == false : "only simple field can be created with this method";
-
-            return new DataSetSearchField(fieldKind, null);
-        }
-
-        // GWT only
-        private DataSetSearchField()
-        {
-            this(null, null);
-        }
-
-        private DataSetSearchField(DataSetSearchFieldKind kind, String propertyCodeOrNull)
-        {
-            this(kind, propertyCodeOrNull, null, null);
-        }
-
-        private DataSetSearchField(DataSetSearchFieldKind kind, String propertyCodeOrNull,
-                List<String> allExperimentPropertyCodesOrNull,
-                List<String> allSamplePropertyCodesOrNull)
-        {
-            this.kind = kind;
-            this.propertyCodeOrNull = propertyCodeOrNull;
-            this.allExperimentPropertyCodesOrNull = allExperimentPropertyCodesOrNull;
-            this.allSamplePropertyCodesOrNull = allSamplePropertyCodesOrNull;
-        }
-
-        public DataSetSearchFieldKind getKind()
-        {
-            return kind;
-        }
-
-        public String getPropertyCode()
-        {
-            assert kind == DataSetSearchFieldKind.EXPERIMENT_PROPERTY
-                    || kind == DataSetSearchFieldKind.SAMPLE_PROPERTY;
-            return propertyCodeOrNull;
-        }
-
-        public List<String> getAllExperimentPropertyCodes()
-        {
-            assert kind == DataSetSearchFieldKind.ANY_EXPERIMENT_PROPERTY
-                    || kind == DataSetSearchFieldKind.ANY_FIELD;
-            return allExperimentPropertyCodesOrNull;
-        }
-
-        public List<String> getAllSamplePropertyCodesOrNull()
-        {
-            assert kind == DataSetSearchFieldKind.ANY_SAMPLE_PROPERTY
-                    || kind == DataSetSearchFieldKind.ANY_FIELD;
-            return allSamplePropertyCodesOrNull;
-        }
-
-        @Override
-        public String toString()
-        {
-            StringBuilder sb = new StringBuilder();
-            sb.append(getKind());
-            if (getKind().equals(DataSetSearchFieldKind.EXPERIMENT_PROPERTY)
-                    || getKind().equals(DataSetSearchFieldKind.SAMPLE_PROPERTY))
-            {
-                sb.append(".");
-                sb.append(getPropertyCode());
-            }
-            return sb.toString();
-        }
-
-    }
-
-    public enum DataSetSearchFieldKind implements IsSerializable
-    {
-
-        ANY_FIELD("Any Field", true),
-
-        ANY_EXPERIMENT_PROPERTY("Any Experiment Property", true),
-
-        ANY_SAMPLE_PROPERTY("Any Sample Property", true),
-
-        DATA_SET_CODE("Data Set Code"),
-
-        DATA_SET_TYPE("Data Set Type"),
-
-        EXPERIMENT("Experiment Code"),
-
-        EXPERIMENT_TYPE("Experiment Type"),
-
-        FILE_TYPE("File Type"),
-
-        GROUP("Group Code"),
-
-        PROJECT("Project Code"),
-
-        SAMPLE("Sample Code"),
-
-        SAMPLE_TYPE("Sample Type"),
-
-        EXPERIMENT_PROPERTY("Experiment Property", true),
-
-        SAMPLE_PROPERTY("Sample Property", true);
-
-        private final String description;
-
-        // if field is complex, it needs some additional information to be interpreted (e.g.
-        // property code)
-        private final boolean isComplex;
-
-        private DataSetSearchFieldKind(String description)
-        {
-            this(description, false);
-        }
-
-        private DataSetSearchFieldKind(String description, boolean isComplex)
-        {
-            this.description = description;
-            this.isComplex = isComplex;
-        }
-
-        public String description()
-        {
-            return description;
-        }
-
-        public static List<DataSetSearchFieldKind> getSimpleFields()
-        {
-            List<DataSetSearchFieldKind> result = new ArrayList<DataSetSearchFieldKind>();
-            for (DataSetSearchFieldKind field : DataSetSearchFieldKind.values())
-            {
-                if (field.isComplex == false)
-                {
-                    result.add(field);
-
-                }
-            }
-            return result;
-        }
-    }
-
     public DataSetSearchCriterion()
     {
     }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSetSearchField.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSetSearchField.java
new file mode 100644
index 00000000000..9d17b2fe9bc
--- /dev/null
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSetSearchField.java
@@ -0,0 +1,135 @@
+/*
+ * Copyright 2009 ETH Zuerich, CISD
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ch.systemsx.cisd.openbis.generic.shared.basic.dto;
+
+import java.util.List;
+
+import com.google.gwt.user.client.rpc.IsSerializable;
+
+/**
+ * Full specification of the field connected with the data set which can be used in text queries.
+ * 
+ * @author Tomasz Pylak
+ */
+public class DataSetSearchField implements IsSerializable
+{
+    private DataSetSearchFieldKind kind;
+
+    private String propertyCodeOrNull;
+
+    private List<String> allExperimentPropertyCodesOrNull;
+
+    private List<String> allSamplePropertyCodesOrNull;
+
+    public static DataSetSearchField createAnyField(List<String> allExperimentPropertyCodes,
+            List<String> allSamplePropertyCodes)
+    {
+        return new DataSetSearchField(DataSetSearchFieldKind.ANY_FIELD, null,
+                allExperimentPropertyCodes, allSamplePropertyCodes);
+    }
+
+    public static DataSetSearchField createAnyExperimentProperty(
+            List<String> allExperimentPropertyCodes)
+    {
+        return new DataSetSearchField(DataSetSearchFieldKind.ANY_EXPERIMENT_PROPERTY, null,
+                allExperimentPropertyCodes, null);
+    }
+
+    public static DataSetSearchField createAnySampleProperty(List<String> allSamplePropertyCodes)
+    {
+        return new DataSetSearchField(DataSetSearchFieldKind.ANY_SAMPLE_PROPERTY, null, null,
+                allSamplePropertyCodes);
+    }
+
+    public static DataSetSearchField createExperimentProperty(String propertyCode)
+    {
+        return new DataSetSearchField(DataSetSearchFieldKind.EXPERIMENT_PROPERTY, propertyCode);
+    }
+
+    public static DataSetSearchField createSampleProperty(String propertyCode)
+    {
+        return new DataSetSearchField(DataSetSearchFieldKind.SAMPLE_PROPERTY, propertyCode);
+    }
+
+    public static DataSetSearchField createSimpleField(DataSetSearchFieldKind fieldKind)
+    {
+        assert fieldKind.isComplex() == false : "only simple field can be created with this method";
+
+        return new DataSetSearchField(fieldKind, null);
+    }
+
+    // GWT only
+    private DataSetSearchField()
+    {
+        this(null, null);
+    }
+
+    private DataSetSearchField(DataSetSearchFieldKind kind, String propertyCodeOrNull)
+    {
+        this(kind, propertyCodeOrNull, null, null);
+    }
+
+    private DataSetSearchField(DataSetSearchFieldKind kind, String propertyCodeOrNull,
+            List<String> allExperimentPropertyCodesOrNull, List<String> allSamplePropertyCodesOrNull)
+    {
+        this.kind = kind;
+        this.propertyCodeOrNull = propertyCodeOrNull;
+        this.allExperimentPropertyCodesOrNull = allExperimentPropertyCodesOrNull;
+        this.allSamplePropertyCodesOrNull = allSamplePropertyCodesOrNull;
+    }
+
+    public DataSetSearchFieldKind getKind()
+    {
+        return kind;
+    }
+
+    public String getPropertyCode()
+    {
+        assert kind == DataSetSearchFieldKind.EXPERIMENT_PROPERTY
+                || kind == DataSetSearchFieldKind.SAMPLE_PROPERTY;
+        return propertyCodeOrNull;
+    }
+
+    public List<String> getAllExperimentPropertyCodes()
+    {
+        assert kind == DataSetSearchFieldKind.ANY_EXPERIMENT_PROPERTY
+                || kind == DataSetSearchFieldKind.ANY_FIELD;
+        return allExperimentPropertyCodesOrNull;
+    }
+
+    public List<String> getAllSamplePropertyCodesOrNull()
+    {
+        assert kind == DataSetSearchFieldKind.ANY_SAMPLE_PROPERTY
+                || kind == DataSetSearchFieldKind.ANY_FIELD;
+        return allSamplePropertyCodesOrNull;
+    }
+
+    @Override
+    public String toString()
+    {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getKind());
+        if (getKind().equals(DataSetSearchFieldKind.EXPERIMENT_PROPERTY)
+                || getKind().equals(DataSetSearchFieldKind.SAMPLE_PROPERTY))
+        {
+            sb.append(".");
+            sb.append(getPropertyCode());
+        }
+        return sb.toString();
+    }
+
+}
\ No newline at end of file
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSetSearchFieldKind.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSetSearchFieldKind.java
new file mode 100644
index 00000000000..13280faad03
--- /dev/null
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSetSearchFieldKind.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2009 ETH Zuerich, CISD
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ch.systemsx.cisd.openbis.generic.shared.basic.dto;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.google.gwt.user.client.rpc.IsSerializable;
+
+/**
+ * Kinds of fields connected with the data set which can be used in text queries.
+ * 
+ * @author Tomasz Pylak
+ */
+public enum DataSetSearchFieldKind implements IsSerializable
+{
+    ANY_FIELD("Any Field", true),
+
+    ANY_EXPERIMENT_PROPERTY("Any Experiment Property", true),
+
+    ANY_SAMPLE_PROPERTY("Any Sample Property", true),
+
+    DATA_SET_CODE("Data Set Code"),
+
+    DATA_SET_TYPE("Data Set Type"),
+
+    EXPERIMENT("Experiment Code"),
+
+    EXPERIMENT_TYPE("Experiment Type"),
+
+    FILE_TYPE("File Type"),
+
+    GROUP("Group Code"),
+
+    PROJECT("Project Code"),
+
+    SAMPLE("Sample Code"),
+
+    SAMPLE_TYPE("Sample Type"),
+
+    EXPERIMENT_PROPERTY("Experiment Property", true),
+
+    SAMPLE_PROPERTY("Sample Property", true);
+
+    private final String description;
+
+    // if field is complex, it needs some additional information to be interpreted (e.g.
+    // property code)
+    private final boolean isComplex;
+
+    private DataSetSearchFieldKind(String description)
+    {
+        this(description, false);
+    }
+
+    private DataSetSearchFieldKind(String description, boolean isComplex)
+    {
+        this.description = description;
+        this.isComplex = isComplex;
+    }
+
+    public String description()
+    {
+        return description;
+    }
+
+    public static List<DataSetSearchFieldKind> getSimpleFields()
+    {
+        List<DataSetSearchFieldKind> result = new ArrayList<DataSetSearchFieldKind>();
+        for (DataSetSearchFieldKind field : DataSetSearchFieldKind.values())
+        {
+            if (field.isComplex == false)
+            {
+                result.add(field);
+
+            }
+        }
+        return result;
+    }
+
+    boolean isComplex()
+    {
+        return isComplex;
+    }
+}
\ No newline at end of file
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/DataSetSearchTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/DataSetSearchTest.java
index 572cb74296f..492bfe86c31 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/DataSetSearchTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/DataSetSearchTest.java
@@ -25,7 +25,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.data.Fi
 import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractGWTTestCase;
 import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.CheckTableCommand;
 import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.Row;
-import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchCriterion.DataSetSearchFieldKind;
+import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchFieldKind;
 
 /**
  * A {@link AbstractGWTTestCase} extension to test <i>Data Set Search</i>.
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/FillSearchCriteria.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/FillSearchCriteria.java
index 25ecad325b3..dcdab0c0e45 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/FillSearchCriteria.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/FillSearchCriteria.java
@@ -25,7 +25,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.Mode
 import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils;
 import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand;
 import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil;
-import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchCriterion.DataSetSearchFieldKind;
+import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchFieldKind;
 
 /**
  * A {@link AbstractDefaultTestCommand} extension for filling {@link CriteriaWidget}.
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/HibernateSearchDAOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/HibernateSearchDAOTest.java
index 2e6f5133b12..c0f41f50b24 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/HibernateSearchDAOTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/HibernateSearchDAOTest.java
@@ -35,9 +35,9 @@ import ch.systemsx.cisd.common.test.AssertionUtil;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IHibernateSearchDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.db.search.LuceneQueryBuilder;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchCriterion;
+import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchField;
+import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchFieldKind;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.SearchCriteria;
-import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchCriterion.DataSetSearchField;
-import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetSearchCriterion.DataSetSearchFieldKind;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.SearchCriteria.CriteriaConnection;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DataSetSearchHitDTO;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
-- 
GitLab