Interface BallotConstrainerQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidConstrainerQuery, OsidExtensibleQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidOperableQuery, OsidQuery, OsidRuleQuery, Suppliable

public interface BallotConstrainerQuery extends OsidConstrainerQuery

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

  • Method Details

    • matchRuledBallotId

      void matchRuledBallotId(Id ballotId, boolean match)
      Matches rules mapped to a ballot.
      Parameters:
      ballotId - the 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.
    • clearRuledBallotIdTerms

      void clearRuledBallotIdTerms()
      Clears the ballot Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsRuledBallotQuery

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

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

      void matchAnyRuledBallot(boolean match)
      Matches rules mapped to any ballot.
      Parameters:
      match - true for rules mapped to any ballot, false to match rules mapped to no ballots
      Compliance:
      mandatory - This method must be implemented.
    • clearRuledBallotTerms

      void clearRuledBallotTerms()
      Clears the ballot query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchPollsId

      void matchPollsId(Id pollsId, boolean match)
      Matches rules mapped to the polls.
      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 query 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 query terms.
      Compliance:
      mandatory - This method must be implemented.
    • getBallotConstrainerQueryRecord

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