Interface EntryQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidExtensibleQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, OsidRelationshipQuery, OsidTemporalQuery, Suppliable

public interface EntryQuery extends OsidRelationshipQuery

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

  • Method Details

    • matchCustomerId

      void matchCustomerId(Id customerId, boolean match)
      Sets the customer Id for this query.
      Parameters:
      customerId - a customer Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - customerId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCustomerIdTerms

      void clearCustomerIdTerms()
      Clears the customer Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCustomerQuery

      boolean supportsCustomerQuery()
      Tests if a CustomerQuery is available.
      Returns:
      true if a customer query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCustomerQuery

      CustomerQuery getCustomerQuery()
      Gets the query for a customer. Multiple retrievals produce a nested OR term.
      Returns:
      the customer query
      Throws:
      UnimplementedException - supportsCustomerQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCustomerQuery()} is {@code true} .
    • clearCustomerTerms

      void clearCustomerTerms()
      Clears the customer terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchItemId

      void matchItemId(Id itemId, boolean match)
      Sets the item Id for this query.
      Parameters:
      itemId - an item Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - itemId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearItemIdTerms

      void clearItemIdTerms()
      Clears the item Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsItemQuery

      boolean supportsItemQuery()
      Tests if an ItemQuery is available.
      Returns:
      true if an item query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getItemQuery

      ItemQuery getItemQuery()
      Gets the query for an item. Multiple retrievals produce a nested OR term.
      Returns:
      the item query
      Throws:
      UnimplementedException - supportsItemQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsItemQuery()} is {@code true} .
    • clearItemTerms

      void clearItemTerms()
      Clears the item terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchPeriodId

      void matchPeriodId(Id periodId, boolean match)
      Sets the period Id for this query to match categories that have a related term.
      Parameters:
      periodId - a billing period Id
      match - true if a positive match, false for a negative match
      Throws:
      NullArgumentException - periodId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearPeriodIdTerms

      void clearPeriodIdTerms()
      Clears the period Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsPeriodQuery

      boolean supportsPeriodQuery()
      Tests if a PeriodQuery is available.
      Returns:
      true if a period query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getPeriodQuery

      PeriodQuery getPeriodQuery()
      Gets the query for a reporting period. Multiple retrievals produce a nested OR term.
      Returns:
      the period query
      Throws:
      UnimplementedException - supportsPeriodQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsPeriodQuery()} is {@code true} .
    • clearPeriodTerms

      void clearPeriodTerms()
      Clears the period terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchQuantity

      void matchQuantity(long low, long high, boolean match)
      Matches entries with a quantity between the given range inclusive.
      Parameters:
      low - start of range
      high - end of range
      match - true if a positive match, false for a negative match
      Throws:
      InvalidArgumentException - low is greater than high
      Compliance:
      mandatory - This method must be implemented.
    • clearQuantityTerms

      void clearQuantityTerms()
      Clears the quantity terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAmount

      void matchAmount(Currency low, Currency high, boolean match)
      Matches the amount between the given range inclusive.
      Parameters:
      low - start of range
      high - end of range
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - low is greater than high
      NullArgumentException - low or high is null
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyAmount

      void matchAnyAmount(boolean match)
      Matches items that have any amount set.
      Parameters:
      match - true to match items with any amount, false to match items with no amount
      Compliance:
      mandatory - This method must be implemented.
    • clearAmountTerms

      void clearAmountTerms()
      Clears the amount terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDebit

      void matchDebit(boolean match)
      Matches items that have debit amounts.
      Parameters:
      match - true to match items with a debit amount, false to match items with a credit amount
      Compliance:
      mandatory - This method must be implemented.
    • clearDebitTerms

      void clearDebitTerms()
      Clears the debit terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchBusinessId

      void matchBusinessId(Id businessId, boolean match)
      Sets the business Id for this query to match entries 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.
    • getEntryQueryRecord

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