Interface UtilityQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidCatalogQuery, OsidExtensibleQuery, OsidFederateableQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, OsidSourceableQuery, Suppliable

public interface UtilityQuery extends OsidCatalogQuery

This is the query for searching for utilities. Each method specifies an AND term while multiple invocations of the same method produce a nested OR .

  • Method Details

    • matchMeterId

      void matchMeterId(Id meterId, boolean match)
      Sets a meter Id .
      Parameters:
      meterId - a meter Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - meterId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearMeterIdTerms

      void clearMeterIdTerms()
      Clears the meter Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsMeterQuery

      boolean supportsMeterQuery()
      Tests if a meter query is available.
      Returns:
      true if a meter query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getMeterQuery

      MeterQuery getMeterQuery()
      Gets the query for a meter.
      Returns:
      the meter query
      Throws:
      UnimplementedException - supportsMeterQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsMeterQuery()} is {@code true} .
    • matchAnyMeter

      void matchAnyMeter(boolean match)
      Matches utilities with any meter.
      Parameters:
      match - true to match utilities with any meter, false to match utilities with no meters
      Compliance:
      mandatory - This method must be implemented.
    • clearMeterTerms

      void clearMeterTerms()
      Clears the meter query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAncestorUtilityId

      void matchAncestorUtilityId(Id utilityId, boolean match)
      Sets the utility Id for this query to match utilities that have the specified utility as an ancestor.
      Parameters:
      utilityId - a utility Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - utilityId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearAncestorUtilityIdTerms

      void clearAncestorUtilityIdTerms()
      Clears the ancestor utility Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAncestorUtilityQuery

      boolean supportsAncestorUtilityQuery()
      Tests if a UtilityQuery is available.
      Returns:
      true if a utility query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAncestorUtilityQuery

      UtilityQuery getAncestorUtilityQuery()
      Gets the query for a utility. Multiple retrievals produce a nested OR term.
      Returns:
      the utility query
      Throws:
      UnimplementedException - supportsAncestorUtilityQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAncestorUtilityQuery()} is {@code true} .
    • clearAncestorUtilityTerms

      void clearAncestorUtilityTerms()
      Clears the ancestor utility query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyAncestorUtility

      void matchAnyAncestorUtility(boolean match)
      Matches utilities with any ancestor.
      Parameters:
      match - true to match utilities with any ancestor, false to match root utilities
      Compliance:
      mandatory - This method must be implemented.
    • matchDescendantUtilityId

      void matchDescendantUtilityId(Id utilityId, boolean match)
      Sets the utility Id for this query to match utilities that have the specified utility as a descendant.
      Parameters:
      utilityId - a utility Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - utilityId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantUtilityIdTerms

      void clearDescendantUtilityIdTerms()
      Clears the descendant utility Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDescendantUtilityQuery

      boolean supportsDescendantUtilityQuery()
      Tests if a UtilityQuery is available.
      Returns:
      true if a utility query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDescendantUtilityQuery

      UtilityQuery getDescendantUtilityQuery()
      Gets the query for a utility. Multiple retrievals produce a nested OR term.
      Returns:
      the utility query
      Throws:
      UnimplementedException - supportsDescendantUtilityQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsDescendantUtilityQuery()} is {@code true} .
    • matchAnyDescendantUtility

      void matchAnyDescendantUtility(boolean match)
      Matches utilities with any descendant.
      Parameters:
      match - true to match utilities with any descendant, false to match leaf utilities
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantUtilityTerms

      void clearDescendantUtilityTerms()
      Clears the descendant utility query terms.
      Compliance:
      mandatory - This method must be implemented.
    • getUtilityQueryRecord

      UtilityQueryRecord getUtilityQueryRecord(Type utilityRecordType) throws OperationFailedException
      Gets the utility query record corresponding to the given Utility record Type .Multiple record retrievals produce a nested boolean OR term.
      Parameters:
      utilityRecordType - a utility record type
      Returns:
      the utility query record
      Throws:
      NullArgumentException - utilityRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(utilityRecordType) is false
      Compliance:
      mandatory - This method must be implemented.