Interface CreditQuery

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

public interface CreditQuery extends OsidRelationshipQuery

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

  • Method Details

    • matchReferenceId

      void matchReferenceId(Id referenceId, boolean match)
      Sets reference Id .
      Parameters:
      referenceId - a reference Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - referenceId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearReferenceIdTerms

      void clearReferenceIdTerms()
      Clears all reference Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchResourceId

      void matchResourceId(Id resourceId, boolean match)
      Sets a resource Id .
      Parameters:
      resourceId - a resource Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - resourceId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearResourceIdTerms

      void clearResourceIdTerms()
      Clears all resource Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsResourceQuery

      boolean supportsResourceQuery()
      Tests if a ResourceQuery is available.
      Returns:
      true if a resource query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getResourceQuery

      ResourceQuery getResourceQuery()
      Gets the query for a resource query. Multiple retrievals produce a nested OR term.
      Returns:
      the resource query
      Throws:
      UnimplementedException - supportsResourceQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsResourceQuery()} is {@code true} .
    • clearResourceTerms

      void clearResourceTerms()
      Clears all resource terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchBillingId

      void matchBillingId(Id billingId, boolean match)
      Sets the billing Id for this query to match credits assigned to billings.
      Parameters:
      billingId - a billing Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - billingId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearBillingIdTerms

      void clearBillingIdTerms()
      Clears all billing Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsBillingQuery

      boolean supportsBillingQuery()
      Tests if a BillingQuery is available.
      Returns:
      true if a billing query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getBillingQuery

      BillingQuery getBillingQuery()
      Gets the query for a billing query. Multiple retrievals produce a nested OR term.
      Returns:
      the billing query
      Throws:
      UnimplementedException - supportsBillingQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsBillingQuery()} is {@code true} .
    • clearBillingTerms

      void clearBillingTerms()
      Clears all billing terms.
      Compliance:
      mandatory - This method must be implemented.
    • getCreditQueryRecord

      CreditQueryRecord getCreditQueryRecord(Type creditRecordType) throws OperationFailedException
      Gets the credit query record corresponding to the given Credit record Type .Multiple record retrievals produce a nested OR term.
      Parameters:
      creditRecordType - a credit record type
      Returns:
      the credit query record
      Throws:
      NullArgumentException - creditRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(creditRecordType) is false
      Compliance:
      mandatory - This method must be implemented.