Class QueryParameterDef

  • Direct Known Subclasses:
    CollectionQueryParameterDef

    public class QueryParameterDef
    extends java.lang.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
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String name
      name of this parameter.
      boolean optional
      whether or not this QueryParameter can be omitted or its value null.
      java.lang.Class type
      type of this parameter.
    • Constructor Summary

      Constructors 
      Constructor Description
      QueryParameterDef​(java.lang.String name, java.lang.Class type, boolean optional)
      main constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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 java.lang.String name
        name of this parameter. Will be compared to all query parameters with an equal name.
      • type

        public final java.lang.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​(java.lang.String name,
                                 java.lang.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.