OSID Logo
OSID Specifications
voting package
Version 3.0.0
Release Candidate Preview
Interfaceosid.voting.PollsQuery
Implementsosid.OsidCatalogQuery
Description

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

MethodmatchCandidateId
Description

Sets the candidate Id for this query.

Parametersosid.id.IdcandidateIda candidate Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT candidateId is null
CompliancemandatoryThis method must be implemented.
MethodclearCandidateIdTerms
Description

Clears the candidate Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsCandidateQuery
Description

Tests if a CandidateQuery is available.

Returnboolean true if a candidate query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetCandidateQuery
Description

Gets the query for a candidate. Multiple retrievals produce a nested OR term.

Returnosid.voting.CandidateQuerythe candidate query
ErrorsUNIMPLEMENTED supportsCandidateQuery() is false
ComplianceoptionalThis method must be implemented if supportsCandidateQuery() is true.
MethodmatchAnyCandidate
Description

Matches polls with any candidate.

Parametersbooleanmatch true to match polls with any candidate, false to match polls with no candidates
CompliancemandatoryThis method must be implemented.
MethodclearCandidateTerms
Description

Clears the candidate terms.

CompliancemandatoryThis method must be implemented.
MethodmatchAncestorPollsId
Description

Sets the polls Id for this query to match polls that have the specified polls as an ancestor.

Parametersosid.id.Idpollsida polls Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT pollsId is null
CompliancemandatoryThis method must be implemented.
MethodclearAncestorPollsIdTerms
Description

Clears the ancestor polls Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsAncestorPollsQuery
Description

Tests if a PollsQuery is available.

Returnboolean true if a polls query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetAncestorPollsQuery
Description

Gets the query for a polls. Multiple retrievals produce a nested OR term.

Returnosid.voting.PollsQuerythe polls query
ErrorsUNIMPLEMENTED supportsAncestorPollsQuery() is false
ComplianceoptionalThis method must be implemented if supportsAncestorPollsQuery() is true.
MethodmatchAnyAncestorPolls
Description

Matches polls with any ancestor.

Parametersbooleanmatch true to match polls with any ancestor, false to match root polls
CompliancemandatoryThis method must be implemented.
MethodclearAncestorPollsTerms
Description

Clears the ancestor polls terms.

CompliancemandatoryThis method must be implemented.
MethodmatchDescendantPollsId
Description

Sets the polls Id for this query to match polls that have the specified polls as a descendant.

Parametersosid.id.Idpollsida polls Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT pollsId is null
CompliancemandatoryThis method must be implemented.
MethodclearDescendantPollsIdTerms
Description

Clears the descendant polls Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsDescendantPollsQuery
Description

Tests if a PollsQuery is available.

Returnboolean true if a polls query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetDescendantPollsQuery
Description

Gets the query for a polls. Multiple retrievals produce a nested OR term.

Returnosid.voting.PollsQuerythe polls query
ErrorsUNIMPLEMENTED supportsDescendantPollsQuery() is false
ComplianceoptionalThis method must be implemented if supportsDescendantPollsQuery() is true.
MethodmatchAnyDescendantPolls
Description

Matches polls with any descendant.

Parametersbooleanmatch true to match polls with any descendant, false to match leaf polls
CompliancemandatoryThis method must be implemented.
MethodclearDescendantPollsTerms
Description

Clears the descendant polls terms.

CompliancemandatoryThis method must be implemented.
MethodgetPollsQueryRecord
Description

Gets the polls query record corresponding to the given Polls record Type. Multiple retrievals produce a nested OR term.

Parametersosid.type.TypepollsRecordTypea polls record type
Returnosid.voting.records.PollsQueryRecordthe polls query record
ErrorsNULL_ARGUMENT pollsRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(pollsRecordType) is false
CompliancemandatoryThis method must be implemented.