public interface AgentQuery extends OsidObjectQuery
This is the query for searching agents. Each method specifies an
AND term while multiple invocations of the same method produce a
nested OR.
The following example returns agents whose display name begins with
"Tom" and whose "login name" is "tom" or "tjcoppet" in an agent record
specified by companyAgentType.
Agent Query query = session.getAgentQuery();
query.matchDisplayName("Tom*", wildcardStringMatchType, true);
companyAgentQuery = query.getAgentQueryRecord(companyAgentType);
companyAgentQuery.matchLoginName("tom");
companyAgentQuery = query.getAgentQueryRecord(companyAgentType);
companyAgentQuery.matchLoginName("tjcoppet");
AgentList agentList = session.getAgentsByQuery(query);
| Modifier and Type | Method and Description |
|---|---|
void |
clearAgencyIdTerms()
Clears the agency
Id terms. |
void |
clearAgencyTerms()
Clears the agency terms.
|
void |
clearResourceIdTerms()
Clears the resource
Id terms. |
void |
clearResourceTerms()
Clears the resource terms.
|
AgencyQuery |
getAgencyQuery()
Gets the query for an agency.
|
AgentQueryRecord |
getAgentQueryRecord(Type agentRecordType)
Gets the agent query record corresponding to the given
Agent
record Type. |
ResourceQuery |
getResourceQuery()
Gets the query for a resource.
|
void |
matchAgencyId(Id agencyId,
boolean match)
Sets the agency
Id for this query. |
void |
matchAnyResource(boolean match)
Matches agents with any resource.
|
void |
matchResourceId(Id agencyId,
boolean match)
Sets the resource
Id for this query. |
boolean |
supportsAgencyQuery()
Tests if an
AgencyQuery is available. |
boolean |
supportsResourceQuery()
Tests if a
ResourceQuery is available. |
clearCommentIdTerms, clearCommentTerms, clearCreditIdTerms, clearCreditTerms, clearDescriptionTerms, clearDisplayNameTerms, clearGenusTypeTerms, clearJournalEntryIdTerms, clearJournalEntryTerms, clearParentGenusTypeTerms, clearRelationshipIdTerms, clearRelationshipPeerIdTerms, clearRelationshipTerms, clearStateIdTerms, clearStateTerms, clearStatisticTerms, clearSubjectIdTerms, clearSubjectRelevancyTerms, clearSubjectTerms, getCommentQuery, getCreditQuery, getJournalEntryQuery, getRelationshipQuery, getStateQuery, getStatisticQuery, getSubjectQuery, getSubjectRelevancyQuery, matchAnyComment, matchAnyCredit, matchAnyDescription, matchAnyDisplayName, matchAnyGenusType, matchAnyJournalEntry, matchAnyRelationship, matchAnyState, matchAnyStatistic, matchAnySubject, matchCommentId, matchCreditId, matchDescription, matchDisplayName, matchGenusType, matchJournalEntryId, matchParentGenusType, matchRelationshipId, matchRelationshipPeerId, matchStateId, matchSubjectId, supportsCommentQuery, supportsCreditQuery, supportsJournalEntryQuery, supportsRelationshipQuery, supportsStateQuery, supportsStatisticQuery, supportsSubjectQuery, supportsSubjectRelevancyQueryclearIdTerms, matchIdclearRecordTerms, matchAnyRecord, matchRecordTypegetRecordTypes, hasRecordTypeclearAnyTerms, clearKeywordTerms, getStringMatchTypes, matchAny, matchKeyword, supportsStringMatchTypevoid matchResourceId(Id agencyId, boolean match)
Id for this query.agencyId - a resource Id match - true for a positive match, false
for a negative matchNullArgumentException - agencyId is
null mandatory - This method must be implemented. void clearResourceIdTerms()
Id terms.mandatory - This method must be implemented. boolean supportsResourceQuery()
ResourceQuery is available. true if a resource query is available,
false otherwisemandatory - This method must be implemented. ResourceQuery getResourceQuery()
OR term.UnimplementedException - supportsResourceQuery()
is false optional - This method must be implemented if
supportsResourceQuery() is true. void matchAnyResource(boolean match)
match - true if to match agents with a resource,
false to match agents with no resourcemandatory - This method must be implemented. void clearResourceTerms()
mandatory - This method must be implemented. void matchAgencyId(Id agencyId, boolean match)
Id for this query.agencyId - an agency Id match - true for a positive match, false
for negative matchNullArgumentException - agencyId is
null mandatory - This method must be implemented. void clearAgencyIdTerms()
Id terms.mandatory - This method must be implemented. boolean supportsAgencyQuery()
AgencyQuery is available. true if an agency query is available,
false otherwisemandatory - This method must be implemented. AgencyQuery getAgencyQuery()
OR term.UnimplementedException - supportsAgencyQuery()
is false optional - This method must be implemented if
supportsAgencyQuery() is true. void clearAgencyTerms()
mandatory - This method must be implemented. AgentQueryRecord getAgentQueryRecord(Type agentRecordType) throws OperationFailedException
Agent
record Type. Multiple retrievals produce a
nested OR term.agentRecordType - an agent record typeNullArgumentException - agentRecordType
is null OperationFailedException - unable to complete requestUnsupportedException -
hasRecordType(agentRecordType) is false mandatory - This method must be implemented.