OSID Logo
OSID Specifications
commenting package
Version 3.0.0
Release Candidate Preview
Interfaceosid.commenting.CommentSearchSession
Implementsosid.commenting.CommentQuerySession
Description

This session provides methods for searching Comment objects. The search query is constructed using the CommentQuery. The comment record Type also specifies the record for the comment query.

getCommentsByQuery() is the basic search method and returns a list of Comment elements. A more advanced search may be performed with getCommentsBySearch(). It accepts a CommentSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getCommentsBySearch() returns a CommentSearchResults that can be used to access the resulting CommentList or be used to perform a search within the result set through CommentSearch.

Comments may have a query record indicated by their respective record types. The query record is accessed via the CommentQuery. The returns in this session may not be cast directly to these interfaces.

MethodgetCommentSearch
Description

Gets a comment search.

Returnosid.commenting.CommentSearchthe comment search
CompliancemandatoryThis method must be implemented.
MethodgetCommentSearchOrder
Description

Gets a comment search order. The CommentSearchOrder is supplied to a CommentSearch to specify the ordering of results.

Returnosid.commenting.CommentSearchOrderthe comment search order
CompliancemandatoryThis method must be implemented.
MethodgetCommentsBySearch
Description

Gets the search results matching the given search.

Parametersosid.commenting.CommentQuerycommentQuerythe comment query
osid.commenting.CommentSearchcommentSearchthe comment search
Returnosid.commenting.CommentSearchResultsthe search results
ErrorsNULL_ARGUMENT commentQuery or commentSearch is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED commentQuery or commentSearch is not of this service
CompliancemandatoryThis method must be implemented.
MethodgetCommentQueryFromInspector
Description

Gets an entry query from an inspector. The inspector is available from an CommentSearchResults.

Parametersosid.commenting.CommentQueryInspectorcommentQueryInspectora comment query inspector
Returnosid.commenting.CommentQuerythe entry query
ErrorsNULL_ARGUMENT commentQueryInspector is null
UNSUPPORTED commentQueryInspector is not of this service
CompliancemandatoryThis method must be implemented.