Interface BallotQuery

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

public interface BallotQuery extends OsidGovernatorQuery, OsidTemporalQuery

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

  • Method Details

    • matchCommissionerId

      void matchCommissionerId(Id commissionerId, boolean match)
      Sets a commissioner Id for this query.
      Parameters:
      commissionerId - a commissioner Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - commissionerId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCommissionerIdTerms

      void clearCommissionerIdTerms()
      Clears the commissioner Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCommissionerQuery

      boolean supportsCommissionerQuery()
      Tests if a ResourceQuery is available.
      Returns:
      true if a commissioner query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCommissionerQuery

      ResourceQuery getCommissionerQuery()
      Gets the query for a commissioner. Multiple retrievals produce a nested OR term.
      Returns:
      the commissioner query
      Throws:
      UnimplementedException - supportsCommissionerQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCommissionerQuery()} is {@code true} .
    • matchAnyCommissioner

      void matchAnyCommissioner(boolean match)
      Matches objects with any commissioner.
      Parameters:
      match - true to match objects with any commissioner, false to match objects with no commissioner
      Compliance:
      mandatory - This method must be implemented.
    • clearCommissionerTerms

      void clearCommissionerTerms()
      Clears the commissioner query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchRevote

      void matchRevote(boolean match)
      Matches ballots that allow vote modification.
      Parameters:
      match - true for a positive match, false for a negative match
      Compliance:
      mandatory - This method must be implemented.
    • clearRevoteTerms

      void clearRevoteTerms()
      Clears the revote ballot terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchRaceId

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

      void clearRaceIdTerms()
      Clears the race Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsRaceQuery

      boolean supportsRaceQuery()
      Tests if a RaceQuery is available.
      Returns:
      true if a race query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getRaceQuery

      RaceQuery getRaceQuery()
      Gets the query for a race. Multiple retrievals produce a nested OR term.
      Returns:
      the race query
      Throws:
      UnimplementedException - supportsRaceQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsRaceQuery()} is {@code true} .
    • matchAnyRace

      void matchAnyRace(boolean match)
      Matches ballots with any race.
      Parameters:
      match - true to match any race, false to match ballots with no races
      Compliance:
      mandatory - This method must be implemented.
    • clearRaceTerms

      void clearRaceTerms()
      Clears the race terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchPollsId

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

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