Interface VoteEnablerQuery

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

public interface VoteEnablerQuery extends OsidEnablerQuery

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

  • Method Details

    • matchRuledVoteId

      void matchRuledVoteId(Id voteId, boolean match)
      Matches mapped to the vote.
      Parameters:
      voteId - the vote Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - voteId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearRuledVoteIdTerms

      void clearRuledVoteIdTerms()
      Clears the vote Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsRuledVoteQuery

      boolean supportsRuledVoteQuery()
      Tests if a VoteQuery is available.
      Returns:
      true if a vote query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getRuledVoteQuery

      VoteQuery getRuledVoteQuery()
      Gets the query for a vote. Multiple retrievals produce a nested OR term.
      Returns:
      the vote query
      Throws:
      UnimplementedException - supportsRuledVoteQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsRuledVoteQuery()} is {@code true} .
    • matchAnyRuledVote

      void matchAnyRuledVote(boolean match)
      Matches mapped to any vote.
      Parameters:
      match - true for mapped to any vote, false to match mapped to no vote
      Compliance:
      mandatory - This method must be implemented.
    • clearRuledVoteTerms

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

      void matchPollsId(Id pollsId, boolean match)
      Sets the polls Id for this query to match votes assigned to 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.
    • getVoteEnablerQueryRecord

      VoteEnablerQueryRecord getVoteEnablerQueryRecord(Type voteEnablerRecordType) throws OperationFailedException
      Gets the vote enabler query record corresponding to the given VoteEnabler record Type .Multiple record retrievals produce a nested OR term.
      Parameters:
      voteEnablerRecordType - a vote enabler record type
      Returns:
      the vote enabler query record
      Throws:
      NullArgumentException - voteEnablerRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(voteEnablerRecordType) is false
      Compliance:
      mandatory - This method must be implemented.