com.distelli.persistence.QueryItemsBuilder Maven / Gradle / Ivy
package com.distelli.persistence;
import java.util.Collection;
import java.util.List;
public interface QueryItemsBuilder {
/**
* @param value specifies that the range key must be equal to this value.
*
* @param is the type of value.
*
* @return this
*/
public QueryItemsBuilder eq(V value);
/**
* @param value specifies that the range key must be less than this value.
*
* @param is the type of value.
*
* @return this
*/
public QueryItemsBuilder lt(V value);
/**
* @param value specifies that the range key must be less than or equal to this value.
*
* @param is the type of value.
*
* @return this
*/
public QueryItemsBuilder le(V value);
/**
* @param value specifies that the range key must be greater than this value.
*
* @param is the type of value.
*
* @return this
*/
public QueryItemsBuilder gt(V value);
/**
* @param value specifies that the range key must be greater than or equal to this value.
*
* @param is the type of value.
*
* @return this
*/
public QueryItemsBuilder ge(V value);
/**
* @param value1 specifies that the range key must be greater than or equal to value1.
*
* @param value2 specifies that the range key must be less than or equal to value2.
*
* @param is the type of value1 and value2.
*
* @return this
*/
public QueryItemsBuilder between(V value1, V value2);
/**
* @param value specifies that the range key must begin with value.
*
* @return this
*/
public QueryItemsBuilder beginsWith(String value);
/**
* @param filterCondFn is used to filter the result set based on additional conditionals.
*
* @return this
*/
public QueryItemsBuilder filter(FilterCondFn filterCondFn);
/**
* @return the count of just this result set. It may be necessary to do additional
* queries with the updated page iterator.
*/
public int count();
/**
* @param attrNames is a set of attribute names to fetch.
*
* @param type is the class of items to return.
*
* @param is the type of item items to return.
*
* @return an unmodifiable list of results. Null is never returned.
*/
public List list(Collection attrNames, Class type);
/**
* @param attrNames is a set of attribute names to fetch.
*
* @return an unmodifiable list of results. Null is never returned.
*/
public List list(Collection attrNames);
/**
* Fetch all attributes.
*
* @param type is the class of items to return.
*
* @param is the type of item items to return.
*
* @return an unmodifiable list of results. Null is never returned.
*/
public default List list(Class type) {
return list(null, type);
}
/**
* Fetch all attributes.
*
* @return an unmodifiable list of results. Null is never returned.
*/
public default List list() {
return list((Collection)null);
}
}