Interface AccountQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidExtensibleQuery, OsidFederateableQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, Suppliable

public interface AccountQuery extends OsidObjectQuery, OsidFederateableQuery

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

  • Method Details

    • matchCreditBalance

      void matchCreditBalance(boolean match)
      Matches accounts that are credit accounts.
      Parameters:
      match - true to match accounts that are credit account, false to match accounts debit accounts
      Compliance:
      mandatory - This method must be implemented.
    • clearCreditBalanceTerms

      void clearCreditBalanceTerms()
      Clears the credit balance terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCode

      void matchCode(String code, Type stringMatchType, boolean match)
      Matches an account code.
      Parameters:
      code - a code
      stringMatchType - the string match type
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - code is not of stringMatchType
      NullArgumentException - code is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyCode

      void matchAnyCode(boolean match)
      Matches an account that has any code assigned.
      Parameters:
      match - true to match accounts with any code, false to match accounts with no code
      Compliance:
      mandatory - This method must be implemented.
    • clearCodeTerms

      void clearCodeTerms()
      Clears the code terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsSummaryQuery

      boolean supportsSummaryQuery()
      Tests if a SummaryQuery is available.
      Returns:
      true if a summery query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getSummaryQuery

      SummaryQuery getSummaryQuery()
      Gets the query for a summary. Multiple retrievals produce a nested OR term.
      Returns:
      the summery query
      Throws:
      UnimplementedException - supportsSummeryQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsSupervisorQuery()} is {@code true} .
    • clearSummaryTerms

      void clearSummaryTerms()
      Clears the summary terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAncestorAccountId

      void matchAncestorAccountId(Id accountId, boolean match)
      Sets the account Id for this query to match accounts that have the specified account as an ancestor.
      Parameters:
      accountId - an account Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - accountId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearAncestorAccountIdTerms

      void clearAncestorAccountIdTerms()
      Clears the ancestor account Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAncestorAccountQuery

      boolean supportsAncestorAccountQuery()
      Tests if an AccountQuery is available.
      Returns:
      true if an account query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAncestorAccountQuery

      AccountQuery getAncestorAccountQuery()
      Gets the query for an account. Multiple retrievals produce a nested OR term.
      Returns:
      the account query
      Throws:
      UnimplementedException - supportsAncestorAccountQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAncestorAccountQuery()} is {@code true} .
    • matchAnyAncestorAccount

      void matchAnyAncestorAccount(boolean match)
      Matches accounts with any account ancestor.
      Parameters:
      match - true to match accounts with any ancestor, false to match root accounts
      Compliance:
      mandatory - This method must be implemented.
    • clearAncestorAccountTerms

      void clearAncestorAccountTerms()
      Clears the ancestor account query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDescendantAccountId

      void matchDescendantAccountId(Id accountId, boolean match)
      Sets the account Id for this query to match accounts that have the specified account as a descendant.
      Parameters:
      accountId - an account Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - accountId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantAccountIdTerms

      void clearDescendantAccountIdTerms()
      Clears the descendant account Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDescendantAccountQuery

      boolean supportsDescendantAccountQuery()
      Tests if an AccountQuery is available.
      Returns:
      true if an account query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDescendantAccountQuery

      AccountQuery getDescendantAccountQuery()
      Gets the query for an account. Multiple retrievals produce a nested OR term.
      Returns:
      the account query
      Throws:
      UnimplementedException - supportsDescendantAccountQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsDescendantAccountQuery()} is {@code true} .
    • matchAnyDescendantAccount

      void matchAnyDescendantAccount(boolean match)
      Matches accounts with any account descendant.
      Parameters:
      match - true to match accounts with any descendant, false to match leaf accounts
      Compliance:
      mandatory - This method must be implemented.
    • clearDescendantAccountTerms

      void clearDescendantAccountTerms()
      Clears the descendant account query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchBusinessId

      void matchBusinessId(Id businessId, boolean match)
      Sets the business Id for this query to match accounts assigned to businesses.
      Parameters:
      businessId - the business Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - businessId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearBusinessIdTerms

      void clearBusinessIdTerms()
      Clears the business Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsBusinessQuery

      boolean supportsBusinessQuery()
      Tests if a BusinessQuery is available.
      Returns:
      true if a business query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getBusinessQuery

      BusinessQuery getBusinessQuery()
      Gets the query for a business. Multiple retrievals produce a nested OR term.
      Returns:
      the business query
      Throws:
      UnimplementedException - supportsBusinessQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsBusinessQuery()} is {@code true} .
    • clearBusinessTerms

      void clearBusinessTerms()
      Clears the business terms.
      Compliance:
      mandatory - This method must be implemented.
    • getAccountQueryRecord

      AccountQueryRecord getAccountQueryRecord(Type accountRecordType) throws OperationFailedException
      Gets the account query record corresponding to the given Account record Type .Multiple record retrievals produce a nested OR term.
      Parameters:
      accountRecordType - an account record type
      Returns:
      the account query record
      Throws:
      NullArgumentException - accountRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(accountRecordType) is false
      Compliance:
      mandatory - This method must be implemented.