Interface RaceQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidExtensibleQuery, OsidGovernatorQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidOperableQuery, OsidQuery, OsidSourceableQuery, OsidSubjugateableQuery, Suppliable

public interface RaceQuery extends OsidGovernatorQuery, OsidSubjugateableQuery

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

  • Method Details

    • matchBallotId

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

      void clearBallotIdTerms()
      Clears the ballot Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsBallotQuery

      boolean supportsBallotQuery()
      Tests if a BallotQuery is available.
      Returns:
      true if a ballot query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getBallotQuery

      BallotQuery getBallotQuery()
      Gets the query for a ballot. Multiple retrievals produce a nested OR term.
      Returns:
      the ballot query
      Throws:
      UnimplementedException - supportsBallotQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsBallotQuery()} is {@code true} .
    • clearBallotTerms

      void clearBallotTerms()
      Clears the ballot terms.
      Compliance:
      mandatory - This method must be implemented.
    • 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.
    • matchPollsId

      void matchPollsId(Id pollsid, boolean match)
      Sets the polls Id for this query.
      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.
    • clearPollsIdTerms

      void clearPollsIdTerms()
      Clears the polls Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsPollsQuery

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

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

      void clearPollsTerms()
      Clears the polls terms.
      Compliance:
      mandatory - This method must be implemented.
    • getRaceQueryRecord

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