public class Parameters extends Object implements Serializable
QueryParameter
and Filter
instances.
Parameters are provided to IQuery
calls
IQuery#findByQuery(String, Parameters)
and
IQuery#findAllByQuery(String, Parameters)
, and define all named
query parameters needed for the call.
The public Strings available here are used throughout this class and should
also be used in query strings as named parameteres. For example, the field
ID
has the value "id", and a query which would like to use
the addId(Long)
method, should define a named parameter of
the form ":id".Modifier and Type | Field and Description |
---|---|
static String |
ALGORITHM
named parameter "algorithm".
|
static String |
CLASS
named parameter "class".
|
static String |
GROUP_ID
named parameter "groupId".
|
static String |
ID
named parameter "id".
|
static String |
IDS
named parameter "ids".
|
static String |
OWNER_ID
named parameter "ownerId".
|
Constructor and Description |
---|
Parameters()
default constructor.
|
Parameters(Filter filter)
Filter constructor.
|
Parameters(Parameters old)
copy constructor.
|
Parameters(QueryParameter[] queryParameters)
copy constructor.
|
Modifier and Type | Method and Description |
---|---|
Parameters |
add(QueryParameter parameter) |
Parameters |
addAlgorithm(String algo) |
Parameters |
addAll(Parameters old)
adds all the information from the passed in Parameters instance to this
instance.
|
Parameters |
addAll(QueryParameter[] queryParameters)
adds all the information from the passed in Parameters instance to this
instance.
|
Parameters |
addBoolean(String name,
Boolean value) |
Parameters |
addClass(Class klass) |
Parameters |
addClass(String name,
Class value) |
Parameters |
addId(Long id) |
Parameters |
addIds(Collection ids) |
Parameters |
addInteger(String name,
Integer value) |
Parameters |
addList(String name,
List value) |
Parameters |
addLong(String name,
Long value) |
Parameters |
addMap(String name,
Map value) |
Parameters |
addSet(String name,
Set value) |
Parameters |
addString(String name,
String value) |
Parameters |
allExps() |
Parameters |
endTime(Timestamp timestamp) |
Parameters |
exp(long id) |
QueryParameter |
get(String name)
lookup a QueryParameter by name.
|
Timestamp |
getEndTime() |
Long |
getExperimenter()
Fulfills the old PojoOptions requirement for returning null if no
owner set.
|
Long |
getGroup()
Fulfills the old PojoOptions requirement for returning null if no
owner set.
|
Integer |
getLimit() |
Integer |
getOffset() |
Timestamp |
getStartTime() |
long |
group() |
Parameters |
grp(long id) |
boolean |
isAcquisitionData() |
boolean |
isExperimenter() |
boolean |
isGroup() |
boolean |
isLeaves() |
boolean |
isOrphan() |
boolean |
isPagination() |
boolean |
isUnique() |
Set<String> |
keySet()
the Set of all names which would would return a non-null value from
get(String) |
Parameters |
leaves() |
Parameters |
noLeaves() |
Parameters |
noOrphan() |
Parameters |
orphan() |
long |
owner() |
Parameters |
page(Integer offset,
Integer limit) |
Parameters |
paginate(Integer offset,
Integer limit) |
QueryParameter[] |
queryParameters()
copies all QueryParameters to an array.
|
Parameters |
setFilter(Filter filter) |
Parameters |
setOptions(Options options) |
Parameters |
startTime(Timestamp timestamp) |
String |
toString() |
Parameters |
unique() |
public static final String ID
public static final String IDS
public static final String CLASS
public static final String ALGORITHM
public static final String OWNER_ID
public static final String GROUP_ID
public Parameters()
Filter
is left null.
queryParameters
collection is initialized to empty
Collection
public Parameters(Filter filter)
new Parameters( new Filter().unique() );
Filter
can be null since this is the default behavior anyway.public Parameters(Parameters old)
Filter
is taken from old instance and
queryParameters
are merged.old
- public Parameters(QueryParameter[] queryParameters)
QueryParameter
s.public QueryParameter[] queryParameters()
public QueryParameter get(String name)
public Set<String> keySet()
get(String)
public Parameters setFilter(Filter filter)
public Parameters setOptions(Options options)
public Parameters add(QueryParameter parameter)
public Parameters addAll(Parameters old)
QueryParameter
s are added, and the Filter
instance is added if the currentold
- Non-null Parameters instance.public Parameters addAll(QueryParameter[] queryParameters)
QueryParameter
s are added, and the Filter
instance is added if the currentqueryParameters
- Non-null array of QueryParameters.public Parameters addClass(Class klass)
public Parameters addClass(String name, Class value)
public Parameters addBoolean(String name, Boolean value)
public Parameters addInteger(String name, Integer value)
public Parameters addLong(String name, Long value)
public Parameters addSet(String name, Set value)
public Parameters addList(String name, List value)
public Parameters addMap(String name, Map value)
public Parameters addString(String name, String value)
public Parameters addId(Long id)
public Parameters addIds(Collection ids)
public Parameters addAlgorithm(String algo)
public Parameters exp(long id)
public Parameters allExps()
public long owner()
public boolean isExperimenter()
public Long getExperimenter()
public Parameters grp(long id)
public long group()
public Long getGroup()
public boolean isGroup()
public Parameters startTime(Timestamp timestamp)
public Timestamp getStartTime()
public Parameters endTime(Timestamp timestamp)
public Timestamp getEndTime()
public Parameters paginate(Integer offset, Integer limit)
public Integer getLimit()
public Integer getOffset()
public boolean isPagination()
public Parameters page(Integer offset, Integer limit)
public Parameters unique()
public boolean isUnique()
public boolean isAcquisitionData()
public boolean isLeaves()
public Parameters leaves()
public Parameters noLeaves()
public Parameters orphan()
public Parameters noOrphan()
public boolean isOrphan()
Version: 5.1.4-ice35-b55
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.