Interface PollsQuery

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

public interface PollsQuery extends OsidCatalogQuery

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

  • Method Details

    • matchCandidateId

      void matchCandidateId(Id candidateId, boolean match)
      Sets the candidate Id for this query.
      Parameters:
      candidateId - a candidate Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - candidateId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCandidateIdTerms

      void clearCandidateIdTerms()
      Clears the candidate Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCandidateQuery

      boolean supportsCandidateQuery()
      Tests if a CandidateQuery is available.
      Returns:
      true if a candidate query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCandidateQuery

      CandidateQuery getCandidateQuery()
      Gets the query for a candidate. Multiple retrievals produce a nested OR term.
      Returns:
      the candidate query
      Throws:
      UnimplementedException - supportsCandidateQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCandidateQuery()} is {@code true} .
    • matchAnyCandidate

      void matchAnyCandidate(boolean match)
      Matches polls with any candidate.
      Parameters:
      match - true to match polls with any candidate, false to match polls with no candidates
      Compliance:
      mandatory - This method must be implemented.
    • clearCandidateTerms

      void clearCandidateTerms()
      Clears the candidate terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAncestorPollsId

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

      void clearAncestorPollsIdTerms()
      Clears the ancestor polls Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAncestorPollsQuery

      boolean supportsAncestorPollsQuery()
      Tests if a PollsQuery is available.
      Returns:
      true if a polls query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAncestorPollsQuery

      PollsQuery getAncestorPollsQuery()
      Gets the query for a polls. Multiple retrievals produce a nested OR term.
      Returns:
      the polls query
      Throws:
      UnimplementedException - supportsAncestorPollsQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAncestorPollsQuery()} is {@code true} .
    • matchAnyAncestorPolls

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

      void clearAncestorPollsTerms()
      Clears the ancestor polls terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDescendantPollsId

      void matchDescendantPollsId(Id pollsid, boolean match)
      Sets the polls Id for this query to match polls that have the specified polls as a descendant.
      Parameters:
      pollsid - a polls Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - pollsId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantPollsIdTerms

      void clearDescendantPollsIdTerms()
      Clears the descendant polls Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDescendantPollsQuery

      boolean supportsDescendantPollsQuery()
      Tests if a PollsQuery is available.
      Returns:
      true if a polls query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDescendantPollsQuery

      PollsQuery getDescendantPollsQuery()
      Gets the query for a polls. Multiple retrievals produce a nested OR term.
      Returns:
      the polls query
      Throws:
      UnimplementedException - supportsDescendantPollsQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsDescendantPollsQuery()} is {@code true} .
    • matchAnyDescendantPolls

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

      void clearDescendantPollsTerms()
      Clears the descendant polls terms.
      Compliance:
      mandatory - This method must be implemented.
    • getPollsQueryRecord

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