Skip to content

Commit

Permalink
Finish addressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhinterlong committed Jul 24, 2017
1 parent 3f0aaad commit 4c92039
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
*
*/
public class SearchFilter extends DimensionalFilter {
private static final String QUERY_TYPE = "type";
private static final String QUERY_VALUE = "value";

/**
* Query type for the search.
Expand All @@ -47,7 +49,7 @@ public enum QueryType {
/**
* Get the QueryType enum from it's search type.
*
* @param type The type of query (i.e. "insensitive_contains")
* @param type The type of query.
*
* @return the enum QueryType if found otherwise empty.
*/
Expand Down Expand Up @@ -85,8 +87,8 @@ private SearchFilter(Dimension dimension, String type, String value) {
super(dimension, DefaultFilterType.SEARCH);
this.query = Collections.unmodifiableMap(new LinkedHashMap<String, String>() {
{
put("type", type);
put("value", value);
put(QUERY_TYPE, type);
put(QUERY_VALUE, value);
}
});
}
Expand All @@ -96,11 +98,11 @@ public Map<String, String> getQuery() {
}

private String getQueryType() {
return query.get("type");
return query.get(QUERY_TYPE);
}

private String getQueryValue() {
return query.get("value");
return query.get(QUERY_VALUE);
}

@Override
Expand Down

0 comments on commit 4c92039

Please sign in to comment.