public class Parameters
extends java.lang.Object
implements java.io.Serializable
QueryParameter
and Filter
instances.
The public Strings available here are used throughout this class and should
also be used in query strings as named parameters. 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 java.lang.String |
ALGORITHM
named parameter "algorithm".
|
static java.lang.String |
CLASS
named parameter "class".
|
static java.lang.String |
GROUP_ID
named parameter "groupId".
|
static java.lang.String |
ID
named parameter "id".
|
static java.lang.String |
IDS
named parameter "ids".
|
static java.lang.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(java.lang.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(java.lang.String name,
java.lang.Boolean value) |
Parameters |
addClass(java.lang.Class klass) |
Parameters |
addClass(java.lang.String name,
java.lang.Class value) |
Parameters |
addId(java.lang.Long id) |
Parameters |
addIds(java.util.Collection ids) |
Parameters |
addInteger(java.lang.String name,
java.lang.Integer value) |
Parameters |
addList(java.lang.String name,
java.util.List value) |
Parameters |
addLong(java.lang.String name,
java.lang.Long value) |
Parameters |
addMap(java.lang.String name,
java.util.Map value) |
Parameters |
addSet(java.lang.String name,
java.util.Set value) |
Parameters |
addString(java.lang.String name,
java.lang.String value) |
Parameters |
allExps() |
Parameters |
cache()
Deprecated.
experimental: may be wholly removed in next major version
|
Parameters |
endTime(java.sql.Timestamp timestamp) |
Parameters |
exp(long id) |
QueryParameter |
get(java.lang.String name)
lookup a QueryParameter by name.
|
java.sql.Timestamp |
getEndTime() |
java.lang.Long |
getExperimenter()
Fulfills the old PojoOptions requirement for returning null if no
owner set.
|
java.lang.Long |
getGroup()
Fulfills the old PojoOptions requirement for returning null if no
owner set.
|
java.lang.Integer |
getLimit() |
java.lang.Integer |
getOffset() |
java.sql.Timestamp |
getStartTime() |
long |
group() |
Parameters |
grp(long id) |
boolean |
isAcquisitionData() |
boolean |
isCache() |
boolean |
isExperimenter() |
boolean |
isGroup() |
boolean |
isLeaves() |
boolean |
isOrphan() |
boolean |
isPagination() |
boolean |
isUnique() |
java.util.Set<java.lang.String> |
keySet()
the Set of all names which would would return a non-null value from
get(String) |
Parameters |
leaves() |
Parameters |
noCache()
Set queries to not be cacheable.
|
Parameters |
noLeaves() |
Parameters |
noOrphan() |
Parameters |
orphan() |
long |
owner() |
Parameters |
page(java.lang.Integer offset,
java.lang.Integer limit) |
Parameters |
paginate(java.lang.Integer offset,
java.lang.Integer limit) |
QueryParameter[] |
queryParameters()
copies all QueryParameters to an array.
|
Parameters |
setFilter(Filter filter) |
Parameters |
setOptions(Options options) |
Parameters |
startTime(java.sql.Timestamp timestamp) |
java.lang.String |
toString() |
Parameters |
unique() |
public static final java.lang.String ID
public static final java.lang.String IDS
public static final java.lang.String CLASS
public static final java.lang.String ALGORITHM
public static final java.lang.String OWNER_ID
public static final java.lang.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(java.lang.String name)
public java.util.Set<java.lang.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(java.lang.Class klass)
public Parameters addClass(java.lang.String name, java.lang.Class value)
public Parameters addBoolean(java.lang.String name, java.lang.Boolean value)
public Parameters addInteger(java.lang.String name, java.lang.Integer value)
public Parameters addLong(java.lang.String name, java.lang.Long value)
public Parameters addSet(java.lang.String name, java.util.Set value)
public Parameters addList(java.lang.String name, java.util.List value)
public Parameters addMap(java.lang.String name, java.util.Map value)
public Parameters addString(java.lang.String name, java.lang.String value)
public Parameters addId(java.lang.Long id)
public Parameters addIds(java.util.Collection ids)
public Parameters addAlgorithm(java.lang.String algo)
public Parameters exp(long id)
public Parameters allExps()
public long owner()
public boolean isExperimenter()
public java.lang.Long getExperimenter()
public Parameters grp(long id)
public long group()
public java.lang.Long getGroup()
public boolean isGroup()
public Parameters startTime(java.sql.Timestamp timestamp)
public java.sql.Timestamp getStartTime()
public Parameters endTime(java.sql.Timestamp timestamp)
public java.sql.Timestamp getEndTime()
public Parameters paginate(java.lang.Integer offset, java.lang.Integer limit)
public java.lang.Integer getLimit()
public java.lang.Integer getOffset()
public boolean isPagination()
public Parameters page(java.lang.Integer offset, java.lang.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()
public Parameters cache()
public Parameters noCache()
public boolean isCache()
public java.lang.String toString()
toString
in class java.lang.Object
Version: 5.4.10-ice35-b105
Copyright © 2019 The University of Dundee & Open Microscopy Environment. All Rights Reserved.