Interface KeyQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidExtensibleQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, Suppliable

public interface KeyQuery extends OsidObjectQuery

This is the query for searching keys. Each method specifies an AND term while multiple invocations of the same method produce a nested OR , except for accessing the KeyQuery record.

  • Method Details

    • matchAgentId

      void matchAgentId(Id agentId, boolean match)
      Sets the agent Id for this query.
      Parameters:
      agentId - an agent Id
      match - true for a positive match, false for negative match
      Throws:
      NullArgumentException - agentId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearAgentIdTerms

      void clearAgentIdTerms()
      Clears the agent Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAgentQuery

      boolean supportsAgentQuery()
      Tests if an AgentQuery is available.
      Returns:
      true if an agent query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAgentQuery

      AgentQuery getAgentQuery()
      Includes an agent query for making relations with Agents . Multiple retrievals return separate query terms nested inside this query term, each which are treated as a boolean OR .
      Returns:
      the agent query
      Throws:
      UnimplementedException - supportsAgentQuery() is false
      Compliance:
      mandatory - This method must be implemented.
    • clearAgentTerms

      void clearAgentTerms()
      Clears the agent terms.
      Compliance:
      mandatory - This method must be implemented.
    • getKeyQueryRecord

      KeyQueryRecord getKeyQueryRecord(Type keyRecordType) throws OperationFailedException
      Gets the key query record corresponding to the given Key record Type .Multiple retrievals produce a nested OR term.
      Parameters:
      keyRecordType - a key record type
      Returns:
      the key query record
      Throws:
      NullArgumentException - keyRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(keyRecordType) is false
      Compliance:
      mandatory - This method must be implemented.