From e60c3f4efeab7984fb8715425d7de87b1fe2713b Mon Sep 17 00:00:00 2001 From: jakubs <jakubs> Date: Fri, 16 Mar 2012 16:08:34 +0000 Subject: [PATCH] LMS-2847: Rename LESS_THAN to LESS_THAN_OR_EQUAL SVN: 24741 --- ...riaToDetailedSearchCriteriaTranslator.java | 4 ++-- .../GeneralInformationServiceJsonApiTest.java | 24 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/SearchCriteriaToDetailedSearchCriteriaTranslator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/SearchCriteriaToDetailedSearchCriteriaTranslator.java index 7a3c5e08576..00a8780ae85 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/SearchCriteriaToDetailedSearchCriteriaTranslator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/SearchCriteriaToDetailedSearchCriteriaTranslator.java @@ -321,10 +321,10 @@ public class SearchCriteriaToDetailedSearchCriteriaTranslator case EQUALS: t = CompareType.EQUALS; break; - case LESS_THAN: + case LESS_THAN_OR_EQUAL: t = CompareType.LESS_THAN_OR_EQUAL; break; - case MORE_THAN: + case MORE_THAN_OR_EQUAL: t = CompareType.MORE_THAN_OR_EQUAL; break; default: diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/remoteapitest/api/v1/GeneralInformationServiceJsonApiTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/remoteapitest/api/v1/GeneralInformationServiceJsonApiTest.java index a087ca09b8a..80505c2e615 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/remoteapitest/api/v1/GeneralInformationServiceJsonApiTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/remoteapitest/api/v1/GeneralInformationServiceJsonApiTest.java @@ -611,16 +611,16 @@ public class GeneralInformationServiceJsonApiTest extends RemoteApiTestCase { sc.addMatchClause(MatchClause.createAttributeMatch( - MatchClauseAttribute.REGISTRATION_DATE, SearchCriteria.CompareMode.LESS_THAN, - lessThan)); + MatchClauseAttribute.REGISTRATION_DATE, + SearchCriteria.CompareMode.LESS_THAN_OR_EQUAL, lessThan)); } if (moreThan != null) { sc.addMatchClause(MatchClause.createAttributeMatch( - MatchClauseAttribute.REGISTRATION_DATE, SearchCriteria.CompareMode.MORE_THAN, - moreThan)); + MatchClauseAttribute.REGISTRATION_DATE, + SearchCriteria.CompareMode.MORE_THAN_OR_EQUAL, moreThan)); } if (equal != null) @@ -688,9 +688,9 @@ public class GeneralInformationServiceJsonApiTest extends RemoteApiTestCase SearchCriteria sc = new SearchCriteria(); sc.addMatchClause(MatchClause.createAttributeMatch(MatchClauseAttribute.MODIFICATION_DATE, - SearchCriteria.CompareMode.MORE_THAN, lower)); + SearchCriteria.CompareMode.MORE_THAN_OR_EQUAL, lower)); sc.addMatchClause(MatchClause.createAttributeMatch(MatchClauseAttribute.MODIFICATION_DATE, - SearchCriteria.CompareMode.LESS_THAN, upper)); + SearchCriteria.CompareMode.LESS_THAN_OR_EQUAL, upper)); List<DataSet> result = generalInformationService.searchForDataSets(sessionToken, sc); assertThat( @@ -710,14 +710,14 @@ public class GeneralInformationServiceJsonApiTest extends RemoteApiTestCase SearchCriteria sc = new SearchCriteria(); sc.addMatchClause(MatchClause.createAttributeMatch(MatchClauseAttribute.REGISTRATION_DATE, - SearchCriteria.CompareMode.MORE_THAN, lowerReg)); + SearchCriteria.CompareMode.MORE_THAN_OR_EQUAL, lowerReg)); sc.addMatchClause(MatchClause.createAttributeMatch(MatchClauseAttribute.REGISTRATION_DATE, - SearchCriteria.CompareMode.LESS_THAN, upperReg)); + SearchCriteria.CompareMode.LESS_THAN_OR_EQUAL, upperReg)); sc.addMatchClause(MatchClause.createAttributeMatch(MatchClauseAttribute.MODIFICATION_DATE, - SearchCriteria.CompareMode.MORE_THAN, lowerMod)); + SearchCriteria.CompareMode.MORE_THAN_OR_EQUAL, lowerMod)); sc.addMatchClause(MatchClause.createAttributeMatch(MatchClauseAttribute.MODIFICATION_DATE, - SearchCriteria.CompareMode.LESS_THAN, upperMod)); + SearchCriteria.CompareMode.LESS_THAN_OR_EQUAL, upperMod)); List<DataSet> result = generalInformationService.searchForDataSets(sessionToken, sc); assertThat( @@ -735,9 +735,9 @@ public class GeneralInformationServiceJsonApiTest extends RemoteApiTestCase SearchCriteria sc = new SearchCriteria(); sc.addMatchClause(MatchClause.createAttributeMatch(MatchClauseAttribute.REGISTRATION_DATE, - SearchCriteria.CompareMode.MORE_THAN, lower)); + SearchCriteria.CompareMode.MORE_THAN_OR_EQUAL, lower)); sc.addMatchClause(MatchClause.createAttributeMatch(MatchClauseAttribute.REGISTRATION_DATE, - SearchCriteria.CompareMode.LESS_THAN, upper)); + SearchCriteria.CompareMode.LESS_THAN_OR_EQUAL, upper)); List<Sample> result = generalInformationService.searchForSamples(sessionToken, sc); assertThat( -- GitLab