ome.services.query
Class QueryParameterDef

java.lang.Object
  extended by ome.services.query.QueryParameterDef
Direct Known Subclasses:
CollectionQueryParameterDef

public class QueryParameterDef
extends Object

definition of a slot into which a QueryParameter must fit. These are typically defined statically in Query subclasses and collected into Definitions which get passed to the super Query constructor.

Since:
OMERO 3.0
Version:
1.0 (Internal version: $Rev: 3997 $ $Date: 2009-03-11 15:06:04 +0000 (Wed, 11 Mar 2009) $)
Author:
Josh Moore, josh.moore@gmx.de

Field Summary
 String name
          name of this parameter.
 boolean optional
          whether or not this QueryParameter can be omitted or its value null.
 Class type
          type of this parameter.
 
Constructor Summary
QueryParameterDef(String name, Class type, boolean optional)
          main constructor.
 
Method Summary
 void errorIfInvalid(ome.parameters.QueryParameter parameter)
          validation method called by Query.checkParameters().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public final String name
name of this parameter. Will be compared to all query parameters with an equal name.


type

public final Class type
type of this parameter. Will restrict what values can be assigned to QueryParameter.value


optional

public final boolean optional
whether or not this QueryParameter can be omitted or its value null.

Constructor Detail

QueryParameterDef

public QueryParameterDef(String name,
                         Class type,
                         boolean optional)
main constructor. Provides all three fields, none of which can be null.

Method Detail

errorIfInvalid

public void errorIfInvalid(ome.parameters.QueryParameter parameter)
validation method called by Query.checkParameters(). Subclasses should be very careful to call super.errorIfInvalid.

Parameters:
parameter - Parameter with a matching name to be validated.


OmeroJava Api

Version: Beta-4.2.0-r7571-b29

Copyright © 2009 The University of Dundee. All Rights Reserved.