From 7d22f6d5ee01b458a2303bb211336805623dd259 Mon Sep 17 00:00:00 2001
From: felmer <felmer>
Date: Wed, 4 May 2016 10:20:14 +0000
Subject: [PATCH] SSDM-3519: Simplify generics for AbstractEntitySearchCriteria

SVN: 36479
---
 .../v3/dto/common/search/AbstractEntitySearchCriteria.java | 7 +++----
 .../asapi/v3/dto/dataset/search/DataSetSearchCriteria.java | 3 +--
 .../v3/dto/experiment/search/ExperimentSearchCriteria.java | 3 +--
 .../v3/dto/material/search/MaterialSearchCriteria.java     | 3 +--
 .../asapi/v3/dto/sample/search/SampleSearchCriteria.java   | 2 +-
 5 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/common/search/AbstractEntitySearchCriteria.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/common/search/AbstractEntitySearchCriteria.java
index a64de5cf6e7..18ba0675437 100644
--- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/common/search/AbstractEntitySearchCriteria.java
+++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/common/search/AbstractEntitySearchCriteria.java
@@ -25,8 +25,7 @@ import ch.systemsx.cisd.base.annotation.JsonObject;
  * @author pkupczyk
  */
 @JsonObject("as.dto.common.search.AbstractEntitySearchCriteria")
-public abstract class AbstractEntitySearchCriteria<ID extends IObjectId, TypeSearchCriteria extends EntityTypeSearchCriteria> extends
-        AbstractObjectSearchCriteria<ID>
+public abstract class AbstractEntitySearchCriteria<ID extends IObjectId> extends AbstractObjectSearchCriteria<ID>
 {
 
     private static final long serialVersionUID = 1L;
@@ -36,9 +35,9 @@ public abstract class AbstractEntitySearchCriteria<ID extends IObjectId, TypeSea
         return with(new CodeSearchCriteria());
     }
 
-    public TypeSearchCriteria withType()
+    public EntityTypeSearchCriteria withType()
     {
-        return (TypeSearchCriteria) with(new EntityTypeSearchCriteria());
+        return with(new EntityTypeSearchCriteria());
     }
 
     public PermIdSearchCriteria withPermId()
diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/search/DataSetSearchCriteria.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/search/DataSetSearchCriteria.java
index fc5e57e3bb9..03e45448697 100644
--- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/search/DataSetSearchCriteria.java
+++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/search/DataSetSearchCriteria.java
@@ -20,7 +20,6 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.search.AbstractEntitySear
 import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.search.SearchCriteriaToStringBuilder;
 import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.search.SearchOperator;
 import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.id.IDataSetId;
-import ch.ethz.sis.openbis.generic.asapi.v3.dto.entitytype.search.EntityTypeSearchCriteria;
 import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.search.ExperimentSearchCriteria;
 import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.search.NoExperimentSearchCriteria;
 import ch.ethz.sis.openbis.generic.asapi.v3.dto.sample.search.NoSampleSearchCriteria;
@@ -31,7 +30,7 @@ import ch.systemsx.cisd.base.annotation.JsonObject;
  * @author pkupczyk
  */
 @JsonObject("as.dto.dataset.search.DataSetSearchCriteria")
-public class DataSetSearchCriteria extends AbstractEntitySearchCriteria<IDataSetId, EntityTypeSearchCriteria>
+public class DataSetSearchCriteria extends AbstractEntitySearchCriteria<IDataSetId>
 {
 
     private static final long serialVersionUID = 1L;
diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/experiment/search/ExperimentSearchCriteria.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/experiment/search/ExperimentSearchCriteria.java
index 04278dbcfc2..a074e21f684 100644
--- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/experiment/search/ExperimentSearchCriteria.java
+++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/experiment/search/ExperimentSearchCriteria.java
@@ -19,7 +19,6 @@ package ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.search;
 import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.search.AbstractEntitySearchCriteria;
 import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.search.SearchCriteriaToStringBuilder;
 import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.search.SearchOperator;
-import ch.ethz.sis.openbis.generic.asapi.v3.dto.entitytype.search.EntityTypeSearchCriteria;
 import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.id.IExperimentId;
 import ch.ethz.sis.openbis.generic.asapi.v3.dto.project.search.ProjectSearchCriteria;
 import ch.systemsx.cisd.base.annotation.JsonObject;
@@ -28,7 +27,7 @@ import ch.systemsx.cisd.base.annotation.JsonObject;
  * @author pkupczyk
  */
 @JsonObject("as.dto.experiment.search.ExperimentSearchCriteria")
-public class ExperimentSearchCriteria extends AbstractEntitySearchCriteria<IExperimentId, EntityTypeSearchCriteria>
+public class ExperimentSearchCriteria extends AbstractEntitySearchCriteria<IExperimentId>
 {
 
     private static final long serialVersionUID = 1L;
diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/material/search/MaterialSearchCriteria.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/material/search/MaterialSearchCriteria.java
index a5dbadb627a..eb4d2da2b80 100644
--- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/material/search/MaterialSearchCriteria.java
+++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/material/search/MaterialSearchCriteria.java
@@ -19,7 +19,6 @@ package ch.ethz.sis.openbis.generic.asapi.v3.dto.material.search;
 import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.search.AbstractEntitySearchCriteria;
 import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.search.SearchCriteriaToStringBuilder;
 import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.search.SearchOperator;
-import ch.ethz.sis.openbis.generic.asapi.v3.dto.entitytype.search.EntityTypeSearchCriteria;
 import ch.ethz.sis.openbis.generic.asapi.v3.dto.material.id.IMaterialId;
 import ch.systemsx.cisd.base.annotation.JsonObject;
 
@@ -27,7 +26,7 @@ import ch.systemsx.cisd.base.annotation.JsonObject;
  * @author pkupczyk
  */
 @JsonObject("as.dto.material.search.MaterialSearchCriteria")
-public class MaterialSearchCriteria extends AbstractEntitySearchCriteria<IMaterialId, EntityTypeSearchCriteria>
+public class MaterialSearchCriteria extends AbstractEntitySearchCriteria<IMaterialId>
 {
 
     private static final long serialVersionUID = 1L;
diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/sample/search/SampleSearchCriteria.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/sample/search/SampleSearchCriteria.java
index ee1211bd9ff..61ce72b12ad 100644
--- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/sample/search/SampleSearchCriteria.java
+++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/sample/search/SampleSearchCriteria.java
@@ -30,7 +30,7 @@ import ch.systemsx.cisd.base.annotation.JsonObject;
  * @author pkupczyk
  */
 @JsonObject("as.dto.sample.search.SampleSearchCriteria")
-public class SampleSearchCriteria extends AbstractEntitySearchCriteria<ISampleId, SampleTypeSearchCriteria>
+public class SampleSearchCriteria extends AbstractEntitySearchCriteria<ISampleId>
 {
 
     private static final long serialVersionUID = 1L;
-- 
GitLab