diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/implementation/TableRestProxy.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/implementation/TableRestProxy.java index 14db5034a07e9..7da2c6a1b4905 100644 --- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/implementation/TableRestProxy.java +++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/implementation/TableRestProxy.java @@ -75,13 +75,12 @@ import com.microsoft.windowsazure.services.table.models.GetServicePropertiesResult; import com.microsoft.windowsazure.services.table.models.GetTableResult; import com.microsoft.windowsazure.services.table.models.InsertEntityResult; -import com.microsoft.windowsazure.services.table.models.LitteralFilter; -import com.microsoft.windowsazure.services.table.models.Query; +import com.microsoft.windowsazure.services.table.models.PropertyNameFilter; import com.microsoft.windowsazure.services.table.models.QueryEntitiesOptions; import com.microsoft.windowsazure.services.table.models.QueryEntitiesResult; +import com.microsoft.windowsazure.services.table.models.QueryStringFilter; import com.microsoft.windowsazure.services.table.models.QueryTablesOptions; import com.microsoft.windowsazure.services.table.models.QueryTablesResult; -import com.microsoft.windowsazure.services.table.models.RawStringFilter; import com.microsoft.windowsazure.services.table.models.ServiceProperties; import com.microsoft.windowsazure.services.table.models.TableServiceOptions; import com.microsoft.windowsazure.services.table.models.UnaryFilter; @@ -185,26 +184,29 @@ private WebResource addOptionalQueryParam(WebResource webResource, String key, O return PipelineHelpers.addOptionalQueryParam(webResource, key, value); } - private WebResource addOptionalQuery(WebResource webResource, Query query) { - if (query == null) + private WebResource addOptionalQueryEntitiesOptions(WebResource webResource, + QueryEntitiesOptions queryEntitiesOptions) { + if (queryEntitiesOptions == null) return webResource; - if (query.getSelectFields() != null && query.getSelectFields().size() > 0) { + if (queryEntitiesOptions.getSelectFields() != null && queryEntitiesOptions.getSelectFields().size() > 0) { webResource = addOptionalQueryParam(webResource, "$select", - CommaStringBuilder.join(encodeODataURIValues(query.getSelectFields()))); + CommaStringBuilder.join(encodeODataURIValues(queryEntitiesOptions.getSelectFields()))); } - if (query.getTop() != null) { - webResource = addOptionalQueryParam(webResource, "$top", encodeODataURIValue(query.getTop().toString())); + if (queryEntitiesOptions.getTop() != null) { + webResource = addOptionalQueryParam(webResource, "$top", encodeODataURIValue(queryEntitiesOptions.getTop() + .toString())); } - if (query.getFilter() != null) { - webResource = addOptionalQueryParam(webResource, "$filter", buildFilterExpression(query.getFilter())); + if (queryEntitiesOptions.getFilter() != null) { + webResource = addOptionalQueryParam(webResource, "$filter", + buildFilterExpression(queryEntitiesOptions.getFilter())); } - if (query.getOrderByFields() != null) { + if (queryEntitiesOptions.getOrderByFields() != null) { webResource = addOptionalQueryParam(webResource, "$orderby", - CommaStringBuilder.join(encodeODataURIValues(query.getOrderByFields()))); + CommaStringBuilder.join(encodeODataURIValues(queryEntitiesOptions.getOrderByFields()))); } return webResource; @@ -220,8 +222,8 @@ private void buildFilterExpression(Filter filter, StringBuilder sb) { if (filter == null) return; - if (filter instanceof LitteralFilter) { - sb.append(((LitteralFilter) filter).getLitteral()); + if (filter instanceof PropertyNameFilter) { + sb.append(((PropertyNameFilter) filter).getPropertyName()); } else if (filter instanceof ConstantFilter) { Object value = ((ConstantFilter) filter).getValue(); @@ -285,8 +287,8 @@ else if (filter instanceof BinaryFilter) { buildFilterExpression(((BinaryFilter) filter).getRight(), sb); sb.append(")"); } - else if (filter instanceof RawStringFilter) { - sb.append(((RawStringFilter) filter).getRawString()); + else if (filter instanceof QueryStringFilter) { + sb.append(((QueryStringFilter) filter).getQueryString()); } } @@ -383,19 +385,25 @@ public QueryTablesResult queryTables() throws ServiceException { @Override public QueryTablesResult queryTables(QueryTablesOptions options) throws ServiceException { - Query query = new Query(); + Filter queryFilter = options.getFilter(); String nextTableName = options.getNextTableName(); String prefix = options.getPrefix(); if (prefix != null) { // Append Max char to end '{' is 1 + 'z' in AsciiTable ==> upperBound is prefix + '{' - Filter prefixFilter = Filter.and(Filter.ge(Filter.litteral("TableName"), Filter.constant(prefix)), - Filter.le(Filter.litteral("TableName"), Filter.constant(prefix + "{"))); - query.setFilter(prefixFilter); + Filter prefixFilter = Filter.and(Filter.ge(Filter.propertyName("TableName"), Filter.constant(prefix)), + Filter.le(Filter.propertyName("TableName"), Filter.constant(prefix + "{"))); + + if (queryFilter == null) { + queryFilter = prefixFilter; + } + else { + queryFilter = Filter.and(queryFilter, prefixFilter); + } } WebResource webResource = getResource(options).path("Tables"); - webResource = addOptionalQuery(webResource, query); + webResource = addOptionalQueryParam(webResource, "$filter", buildFilterExpression(queryFilter)); webResource = addOptionalQueryParam(webResource, "NextTableName", nextTableName); WebResource.Builder builder = webResource.getRequestBuilder(); @@ -613,7 +621,7 @@ public QueryEntitiesResult queryEntities(String table, QueryEntitiesOptions opti options = new QueryEntitiesOptions(); WebResource webResource = getResource(options).path(table); - webResource = addOptionalQuery(webResource, options.getQuery()); + webResource = addOptionalQueryEntitiesOptions(webResource, options); webResource = addOptionalQueryParam(webResource, "NextPartitionKey", encodeODataURIValue(options.getNextPartitionKey())); webResource = addOptionalQueryParam(webResource, "NextRowKey", encodeODataURIValue(options.getNextRowKey())); diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/BinaryFilter.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/BinaryFilter.java index 2cdb8473a26d3..7666da869e056 100644 --- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/BinaryFilter.java +++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/BinaryFilter.java @@ -15,34 +15,26 @@ package com.microsoft.windowsazure.services.table.models; public class BinaryFilter extends Filter { - private String operator; - private Filter left; - private Filter right; + private final String operator; + private final Filter left; + private final Filter right; - public String getOperator() { - return operator; + public BinaryFilter(Filter left, String operator, Filter right) { + this.left = left; + this.operator = operator; + this.right = right; } - public BinaryFilter setOperator(String operator) { - this.operator = operator; - return this; + public String getOperator() { + return operator; } public Filter getLeft() { return left; } - public BinaryFilter setLeft(Filter left) { - this.left = left; - return this; - } - public Filter getRight() { return right; } - public BinaryFilter setRight(Filter right) { - this.right = right; - return this; - } } diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/ConstantFilter.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/ConstantFilter.java index 098b28ae0e397..aa3dd041be7cc 100644 --- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/ConstantFilter.java +++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/ConstantFilter.java @@ -15,14 +15,13 @@ package com.microsoft.windowsazure.services.table.models; public class ConstantFilter extends Filter { - private Object value; + private final Object value; - public Object getValue() { - return value; + public ConstantFilter(Object value) { + this.value = value; } - public ConstantFilter setValue(Object value) { - this.value = value; - return this; + public Object getValue() { + return value; } } diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/Filter.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/Filter.java index 31a6daf581b22..1e410d2adfb46 100644 --- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/Filter.java +++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/Filter.java @@ -16,50 +16,50 @@ public class Filter { public static UnaryFilter not(Filter operand) { - return new UnaryFilter().setOperator("not").setOperand(operand); + return new UnaryFilter("not", operand); } public static BinaryFilter and(Filter left, Filter right) { - return new BinaryFilter().setOperator("and").setLeft(left).setRight(right); + return new BinaryFilter(left, "and", right); } public static BinaryFilter or(Filter left, Filter right) { - return new BinaryFilter().setOperator("or").setLeft(left).setRight(right); + return new BinaryFilter(left, "or", right); } public static BinaryFilter eq(Filter left, Filter right) { - return new BinaryFilter().setOperator("eq").setLeft(left).setRight(right); + return new BinaryFilter(left, "eq", right); } public static BinaryFilter ne(Filter left, Filter right) { - return new BinaryFilter().setOperator("ne").setLeft(left).setRight(right); + return new BinaryFilter(left, "ne", right); } public static BinaryFilter ge(Filter left, Filter right) { - return new BinaryFilter().setOperator("ge").setLeft(left).setRight(right); + return new BinaryFilter(left, "ge", right); } public static BinaryFilter gt(Filter left, Filter right) { - return new BinaryFilter().setOperator("gt").setLeft(left).setRight(right); + return new BinaryFilter(left, "gt", right); } public static BinaryFilter lt(Filter left, Filter right) { - return new BinaryFilter().setOperator("lt").setLeft(left).setRight(right); + return new BinaryFilter(left, "lt", right); } public static BinaryFilter le(Filter left, Filter right) { - return new BinaryFilter().setOperator("le").setLeft(left).setRight(right); + return new BinaryFilter(left, "le", right); } public static ConstantFilter constant(Object value) { - return new ConstantFilter().setValue(value); + return new ConstantFilter(value); } - public static LitteralFilter litteral(String value) { - return new LitteralFilter().setLitteral(value); + public static PropertyNameFilter propertyName(String value) { + return new PropertyNameFilter(value); } - public static RawStringFilter rawString(String value) { - return new RawStringFilter().setRawString(value); + public static QueryStringFilter queryString(String value) { + return new QueryStringFilter(value); } } diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/RawStringFilter.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/PropertyNameFilter.java similarity index 72% rename from microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/RawStringFilter.java rename to microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/PropertyNameFilter.java index 12aaedf407d4e..49cb129d86e03 100644 --- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/RawStringFilter.java +++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/PropertyNameFilter.java @@ -14,15 +14,15 @@ */ package com.microsoft.windowsazure.services.table.models; -public class RawStringFilter extends Filter { - private String rawString; +public class PropertyNameFilter extends Filter { + private final String propertyName; - public String getRawString() { - return rawString; + public PropertyNameFilter(String propertyName) { + this.propertyName = propertyName; } - public RawStringFilter setRawString(String rawString) { - this.rawString = rawString; - return this; + public String getPropertyName() { + return propertyName; } + } diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/Query.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/Query.java deleted file mode 100644 index cf3997dd7225c..0000000000000 --- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/Query.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Copyright 2012 Microsoft Corporation - * - * 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 com.microsoft.windowsazure.services.table.models; - -import java.util.ArrayList; -import java.util.List; - -public class Query { - private List selectFields = new ArrayList(); - private String from; - private Filter filter; - private List orderByFields = new ArrayList(); - private Integer top; - - public List getSelectFields() { - return selectFields; - } - - public Query setSelectFields(List selectFields) { - this.selectFields = selectFields; - return this; - } - - public Query addSelectField(String selectField) { - this.selectFields.add(selectField); - return this; - } - - public String getFrom() { - return from; - } - - public Query setFrom(String from) { - this.from = from; - return this; - } - - public Filter getFilter() { - return filter; - } - - public Query setFilter(Filter filter) { - this.filter = filter; - return this; - } - - public List getOrderByFields() { - return orderByFields; - } - - public Query setOrderByFields(List orderByFields) { - this.orderByFields = orderByFields; - return this; - } - - public Query addOrderByField(String orderByField) { - this.orderByFields.add(orderByField); - return this; - } - - public Integer getTop() { - return top; - } - - public Query setTop(Integer top) { - this.top = top; - return this; - } -} diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/QueryEntitiesOptions.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/QueryEntitiesOptions.java index 31c7d05652bc7..e5d7a7c511513 100644 --- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/QueryEntitiesOptions.java +++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/QueryEntitiesOptions.java @@ -14,19 +14,19 @@ */ package com.microsoft.windowsazure.services.table.models; +import java.util.ArrayList; +import java.util.List; + public class QueryEntitiesOptions extends TableServiceOptions { - private Query query; - public String nextPartitionKey; - public String nextRowKey; - public Query getQuery() { - return query; - } + private List selectFields = new ArrayList(); + private String from; + private Filter filter; + private List orderByFields = new ArrayList(); + private Integer top; - public QueryEntitiesOptions setQuery(Query query) { - this.query = query; - return this; - } + public String nextPartitionKey; + public String nextRowKey; public String getNextPartitionKey() { return nextPartitionKey; @@ -45,4 +45,59 @@ public QueryEntitiesOptions setNextRowKey(String nextRowKey) { this.nextRowKey = nextRowKey; return this; } + + public List getSelectFields() { + return selectFields; + } + + public QueryEntitiesOptions setSelectFields(List selectFields) { + this.selectFields = selectFields; + return this; + } + + public QueryEntitiesOptions addSelectField(String selectField) { + this.selectFields.add(selectField); + return this; + } + + public String getFrom() { + return from; + } + + public QueryEntitiesOptions setFrom(String from) { + this.from = from; + return this; + } + + public Filter getFilter() { + return filter; + } + + public QueryEntitiesOptions setFilter(Filter filter) { + this.filter = filter; + return this; + } + + public List getOrderByFields() { + return orderByFields; + } + + public QueryEntitiesOptions setOrderByFields(List orderByFields) { + this.orderByFields = orderByFields; + return this; + } + + public QueryEntitiesOptions addOrderByField(String orderByField) { + this.orderByFields.add(orderByField); + return this; + } + + public Integer getTop() { + return top; + } + + public QueryEntitiesOptions setTop(Integer top) { + this.top = top; + return this; + } } diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/LitteralFilter.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/QueryStringFilter.java similarity index 73% rename from microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/LitteralFilter.java rename to microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/QueryStringFilter.java index 08a62dbf957b5..77341e2477c57 100644 --- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/LitteralFilter.java +++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/QueryStringFilter.java @@ -14,15 +14,14 @@ */ package com.microsoft.windowsazure.services.table.models; -public class LitteralFilter extends Filter { - private String litteral; +public class QueryStringFilter extends Filter { + private final String queryString; - public String getLitteral() { - return litteral; + public QueryStringFilter(String queryString) { + this.queryString = queryString; } - public LitteralFilter setLitteral(String litteral) { - this.litteral = litteral; - return this; + public String getQueryString() { + return queryString; } } diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/QueryTablesOptions.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/QueryTablesOptions.java index f115f9ed52d8f..d72c580a402f4 100644 --- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/QueryTablesOptions.java +++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/QueryTablesOptions.java @@ -15,9 +15,19 @@ package com.microsoft.windowsazure.services.table.models; public class QueryTablesOptions extends TableServiceOptions { + private Filter filter; private String nextTableName; private String prefix; + public Filter getFilter() { + return filter; + } + + public QueryTablesOptions setFilter(Filter filter) { + this.filter = filter; + return this; + } + public String getNextTableName() { return nextTableName; } diff --git a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/UnaryFilter.java b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/UnaryFilter.java index f6da13830a0cb..99aa90409830b 100644 --- a/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/UnaryFilter.java +++ b/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/models/UnaryFilter.java @@ -15,24 +15,20 @@ package com.microsoft.windowsazure.services.table.models; public class UnaryFilter extends Filter { - private String operator; - private Filter operand; + private final String operator; + private final Filter operand; - public String getOperator() { - return operator; + public UnaryFilter(String operator, Filter operand) { + this.operator = operator; + this.operand = operand; } - public UnaryFilter setOperator(String operator) { - this.operator = operator; - return this; + public String getOperator() { + return operator; } public Filter getOperand() { return operand; } - public UnaryFilter setOperand(Filter operand) { - this.operand = operand; - return this; - } } diff --git a/microsoft-azure-api/src/test/java/com/microsoft/windowsazure/services/table/TableServiceIntegrationTest.java b/microsoft-azure-api/src/test/java/com/microsoft/windowsazure/services/table/TableServiceIntegrationTest.java index 55fc4c14fb3a0..07b25300bc20b 100644 --- a/microsoft-azure-api/src/test/java/com/microsoft/windowsazure/services/table/TableServiceIntegrationTest.java +++ b/microsoft-azure-api/src/test/java/com/microsoft/windowsazure/services/table/TableServiceIntegrationTest.java @@ -41,7 +41,6 @@ import com.microsoft.windowsazure.services.table.models.GetEntityResult; import com.microsoft.windowsazure.services.table.models.GetTableResult; import com.microsoft.windowsazure.services.table.models.InsertEntityResult; -import com.microsoft.windowsazure.services.table.models.Query; import com.microsoft.windowsazure.services.table.models.QueryEntitiesOptions; import com.microsoft.windowsazure.services.table.models.QueryEntitiesResult; import com.microsoft.windowsazure.services.table.models.QueryTablesOptions; @@ -488,8 +487,8 @@ public void deleteEntityTroublesomeKeyWorks() throws Exception { QueryEntitiesResult assertResult2 = service.queryEntities( TEST_TABLE_2, - new QueryEntitiesOptions().setQuery(new Query().setFilter(Filter.eq(Filter.litteral("RowKey"), - Filter.constant("key'with'quotes"))))); + new QueryEntitiesOptions().setFilter(Filter.eq(Filter.propertyName("RowKey"), + Filter.constant("key'with'quotes")))); assertEquals(0, assertResult2.getEntities().size()); @@ -678,9 +677,10 @@ public void queryEntitiesWithFilterWorks() throws Exception { { // Act - QueryEntitiesResult result = service.queryEntities(table, - new QueryEntitiesOptions().setQuery(new Query().setFilter(Filter.eq(Filter.litteral("RowKey"), - Filter.constant("queryEntitiesWithFilterWorks-3"))))); + QueryEntitiesResult result = service.queryEntities( + table, + new QueryEntitiesOptions().setFilter(Filter.eq(Filter.propertyName("RowKey"), + Filter.constant("queryEntitiesWithFilterWorks-3")))); // Assert assertNotNull(result); @@ -690,8 +690,8 @@ public void queryEntitiesWithFilterWorks() throws Exception { { // Act - QueryEntitiesResult result = service.queryEntities(table, new QueryEntitiesOptions().setQuery(new Query() - .setFilter(Filter.rawString("RowKey eq 'queryEntitiesWithFilterWorks-3'")))); + QueryEntitiesResult result = service.queryEntities(table, new QueryEntitiesOptions().setFilter(Filter + .queryString("RowKey eq 'queryEntitiesWithFilterWorks-3'"))); // Assert assertNotNull(result); @@ -701,10 +701,11 @@ public void queryEntitiesWithFilterWorks() throws Exception { { // Act - QueryEntitiesResult result = service.queryEntities( - table, - new QueryEntitiesOptions().setQuery(new Query().setFilter(Filter.eq(Filter.litteral("test"), - Filter.constant(true))))); + QueryEntitiesResult result = service + .queryEntities( + table, + new QueryEntitiesOptions().setFilter(Filter.eq(Filter.propertyName("test"), + Filter.constant(true)))); // Assert assertNotNull(result); @@ -713,8 +714,10 @@ public void queryEntitiesWithFilterWorks() throws Exception { { // Act - QueryEntitiesResult result = service.queryEntities(table, new QueryEntitiesOptions().setQuery(new Query() - .setFilter(Filter.eq(Filter.litteral("test2"), Filter.constant("'value'3"))))); + QueryEntitiesResult result = service.queryEntities( + table, + new QueryEntitiesOptions().setFilter(Filter.eq(Filter.propertyName("test2"), + Filter.constant("'value'3")))); // Assert assertNotNull(result); @@ -724,8 +727,10 @@ public void queryEntitiesWithFilterWorks() throws Exception { { // Act - QueryEntitiesResult result = service.queryEntities(table, new QueryEntitiesOptions().setQuery(new Query() - .setFilter(Filter.eq(Filter.litteral("test4"), Filter.constant(12345678903L))))); + QueryEntitiesResult result = service.queryEntities( + table, + new QueryEntitiesOptions().setFilter(Filter.eq(Filter.propertyName("test4"), + Filter.constant(12345678903L)))); // Assert assertNotNull(result); @@ -735,8 +740,10 @@ public void queryEntitiesWithFilterWorks() throws Exception { { // Act - QueryEntitiesResult result = service.queryEntities(table, new QueryEntitiesOptions().setQuery(new Query() - .setFilter(Filter.eq(Filter.litteral("test5"), Filter.constant(new Date(3000)))))); + QueryEntitiesResult result = service.queryEntities( + table, + new QueryEntitiesOptions().setFilter(Filter.eq(Filter.propertyName("test5"), + Filter.constant(new Date(3000))))); // Assert assertNotNull(result); @@ -746,9 +753,10 @@ public void queryEntitiesWithFilterWorks() throws Exception { { // Act - QueryEntitiesResult result = service.queryEntities(table, new QueryEntitiesOptions().setQuery(new Query() - .setFilter(Filter.eq(Filter.litteral("test6"), - Filter.constant(entities[3].getPropertyValue("test6")))))); + QueryEntitiesResult result = service.queryEntities( + table, + new QueryEntitiesOptions().setFilter(Filter.eq(Filter.propertyName("test6"), + Filter.constant(entities[3].getPropertyValue("test6"))))); // Assert assertNotNull(result);