From 99fdaa8f38c87767b1c25c321c6888e8de22bd1c Mon Sep 17 00:00:00 2001
From: fedoreno <fedoreno>
Date: Fri, 22 Apr 2016 12:03:06 +0000
Subject: [PATCH] SSDM-3519: fixing uncorresponding to java returns in js

SVN: 36270
---
 .../api/v3/as/dto/dataset/search/DataSetSearchCriteria.js   | 6 ++++--
 .../api/v3/as/dto/sample/search/SampleSearchCriteria.js     | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/DataSetSearchCriteria.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/DataSetSearchCriteria.js
index 140ef89a188..440de62d377 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/DataSetSearchCriteria.js
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/DataSetSearchCriteria.js
@@ -27,7 +27,8 @@ define([ "require", "stjs", "as/dto/common/search/AbstractEntitySearchCriteria",
 				};
 				prototype.withoutExperiment = function() {
 					var NoExperimentSearchCriteria = require("as/dto/experiment/search/NoExperimentSearchCriteria");
-					return this.addCriteria(new NoExperimentSearchCriteria());
+					this.addCriteria(new NoExperimentSearchCriteria());
+					return this;
 				};
 				prototype.withSample = function() {
 					var SampleSearchCriteria = require("as/dto/sample/search/SampleSearchCriteria");
@@ -35,7 +36,8 @@ define([ "require", "stjs", "as/dto/common/search/AbstractEntitySearchCriteria",
 				};
 				prototype.withoutSample = function() {
 					var NoSampleSearchCriteria = require("as/dto/sample/search/NoSampleSearchCriteria");
-					return this.addCriteria(new NoSampleSearchCriteria());
+					this.addCriteria(new NoSampleSearchCriteria());
+					return this;
 				};
 				prototype.withOrOperator = function() {
 					return this.withOperator(SearchOperator.OR);
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/sample/search/SampleSearchCriteria.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/sample/search/SampleSearchCriteria.js
index 6992f4a362e..0edde5cda3d 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/sample/search/SampleSearchCriteria.js
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/sample/search/SampleSearchCriteria.js
@@ -23,7 +23,8 @@ define([ "require", "stjs", "as/dto/common/search/AbstractEntitySearchCriteria",
 		};
 		prototype.withoutExperiment = function() {
 			var NoExperimentSearchCriteria = require("as/dto/experiment/search/NoExperimentSearchCriteria");
-			return this.addCriteria(new NoExperimentSearchCriteria());
+			this.addCriteria(new NoExperimentSearchCriteria());
+			return this;
 		};
 		prototype.withParents = function() {
 			return this.addCriteria(new SampleParentsSearchCriteria());
@@ -36,7 +37,8 @@ define([ "require", "stjs", "as/dto/common/search/AbstractEntitySearchCriteria",
 		};
 		prototype.withoutContainer = function() {
 			var NoSampleContainerSearchCriteria = require("as/dto/sample/search/NoSampleContainerSearchCriteria");
-			return this.addCriteria(new NoSampleContainerSearchCriteria());
+			this.addCriteria(new NoSampleContainerSearchCriteria());
+			return this;
 		};
 		prototype.withListableOnly = function() {
 			var OnlyListableSearchCriteria = require("as/dto/sample/search/OnlyListableSearchCriteria");
-- 
GitLab