Package ome.parameters
Class Parameters
- java.lang.Object
-
- ome.parameters.Parameters
-
- All Implemented Interfaces:
java.io.Serializable
public class Parameters extends java.lang.Object implements java.io.Serializable
container object forQueryParameter
andFilter
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 fieldID
has the value "id", and a query which would like to use theaddId(Long)
method, should define a named parameter of the form ":id".- Since:
- 3.0-M2
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description Parameters()
default constructor.Parameters(Filter filter)
Filter constructor.Parameters(Parameters old)
copy constructor.Parameters(QueryParameter[] queryParameters)
copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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 versionParameters
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 fromget(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()
-
-
-
Field Detail
-
ID
public static final java.lang.String ID
named parameter "id". Used in query strings as ":id"- See Also:
- Constant Field Values
-
IDS
public static final java.lang.String IDS
named parameter "ids". Used in query strings as ":ids"- See Also:
- Constant Field Values
-
CLASS
public static final java.lang.String CLASS
named parameter "class". Used in query strings as ":class"- See Also:
- Constant Field Values
-
ALGORITHM
public static final java.lang.String ALGORITHM
named parameter "algorithm". Used in query strings as ":algorithm"- See Also:
- Constant Field Values
-
OWNER_ID
public static final java.lang.String OWNER_ID
named parameter "ownerId". Used in query strings as ":ownerId"- See Also:
- Constant Field Values
-
GROUP_ID
public static final java.lang.String GROUP_ID
named parameter "groupId". Used in query strings as ":groupId"- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Parameters
public Parameters()
default constructor.Filter
is left null.queryParameters
collection is initialized to emptyCollection
-
Parameters
public Parameters(Filter filter)
Filter constructor. Allows for the simple specification of "unique" results.new Parameters( new Filter().unique() );
Filter can be null since this is the default behavior anyway.
-
Parameters
public Parameters(Parameters old)
copy constructor.Filter
is taken from old instance andqueryParameters
are merged.- Parameters:
old
-
-
Parameters
public Parameters(QueryParameter[] queryParameters)
copy constructor. MergesQueryParameter
s.
-
-
Method Detail
-
queryParameters
public QueryParameter[] queryParameters()
copies all QueryParameters to an array. Changes to this array do not effect the internal QueryParameters.- Returns:
- array of QueryParameter.
-
get
public QueryParameter get(java.lang.String name)
lookup a QueryParameter by name.
-
keySet
public java.util.Set<java.lang.String> keySet()
the Set of all names which would would return a non-null value fromget(String)
- Returns:
- a Set of Strings.
-
setFilter
public Parameters setFilter(Filter filter)
-
setOptions
public Parameters setOptions(Options options)
-
add
public Parameters add(QueryParameter parameter)
-
addAll
public Parameters addAll(Parameters old)
adds all the information from the passed in Parameters instance to this instance. AllQueryParameter
s are added, and theFilter
instance is added if the current- Parameters:
old
- Non-null Parameters instance.- Returns:
- this
-
addAll
public Parameters addAll(QueryParameter[] queryParameters)
adds all the information from the passed in Parameters instance to this instance. AllQueryParameter
s are added, and theFilter
instance is added if the current- Parameters:
queryParameters
- Non-null array of QueryParameters.- Returns:
- this
-
addClass
public Parameters addClass(java.lang.Class klass)
-
addClass
public Parameters addClass(java.lang.String name, java.lang.Class value)
-
addBoolean
public Parameters addBoolean(java.lang.String name, java.lang.Boolean value)
-
addInteger
public Parameters addInteger(java.lang.String name, java.lang.Integer value)
-
addLong
public Parameters addLong(java.lang.String name, java.lang.Long value)
-
addSet
public Parameters addSet(java.lang.String name, java.util.Set value)
-
addList
public Parameters addList(java.lang.String name, java.util.List value)
-
addMap
public Parameters addMap(java.lang.String name, java.util.Map value)
-
addString
public Parameters addString(java.lang.String name, java.lang.String value)
-
addId
public Parameters addId(java.lang.Long id)
-
addIds
public Parameters addIds(java.util.Collection ids)
-
addAlgorithm
public Parameters addAlgorithm(java.lang.String algo)
-
exp
public Parameters exp(long id)
-
allExps
public Parameters allExps()
-
owner
public long owner()
-
isExperimenter
public boolean isExperimenter()
-
getExperimenter
public java.lang.Long getExperimenter()
Fulfills the old PojoOptions requirement for returning null if no owner set.
-
grp
public Parameters grp(long id)
-
group
public long group()
-
getGroup
public java.lang.Long getGroup()
Fulfills the old PojoOptions requirement for returning null if no owner set.
-
isGroup
public boolean isGroup()
-
startTime
public Parameters startTime(java.sql.Timestamp timestamp)
-
getStartTime
public java.sql.Timestamp getStartTime()
-
endTime
public Parameters endTime(java.sql.Timestamp timestamp)
-
getEndTime
public java.sql.Timestamp getEndTime()
-
paginate
public Parameters paginate(java.lang.Integer offset, java.lang.Integer limit)
-
getLimit
public java.lang.Integer getLimit()
-
getOffset
public java.lang.Integer getOffset()
-
isPagination
public boolean isPagination()
-
page
public Parameters page(java.lang.Integer offset, java.lang.Integer limit)
-
unique
public Parameters unique()
-
isUnique
public boolean isUnique()
-
isAcquisitionData
public boolean isAcquisitionData()
-
isLeaves
public boolean isLeaves()
-
leaves
public Parameters leaves()
-
noLeaves
public Parameters noLeaves()
-
orphan
public Parameters orphan()
-
noOrphan
public Parameters noOrphan()
-
isOrphan
public boolean isOrphan()
-
cache
public Parameters cache()
Deprecated.experimental: may be wholly removed in next major versionSet queries to be cacheable. Use with caution.- Returns:
- this instance, for method chaining
-
noCache
public Parameters noCache()
Set queries to not be cacheable. This is the default.- Returns:
- this instance, for method chaining
-
isCache
public boolean isCache()
- Returns:
- if queries are cacheable
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-