biz.hammurapi.rules.jsr94.tck
Class TckRule

java.lang.Object
  extended by Rule
      extended by biz.hammurapi.rules.jsr94.tck.TckRule

public class TckRule
extends Rule


Constructor Summary
TckRule()
           
 
Method Summary
 boolean accept(Invoice invoice, AcceptInfo acceptInfo)
          This method filters invoices so only unpaid ones are passed to infer(customer, invoice)
 void infer(Customer customer, Invoice invoice)
          If the credit limit of the customer is greater than the amount of the invoice and the status of the invoice is unpaid then decrement the credit limit with the amount of invoice and set the status of the invoice to paid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TckRule

public TckRule()
Method Detail

accept

public boolean accept(Invoice invoice,
                      AcceptInfo acceptInfo)
This method filters invoices so only unpaid ones are passed to infer(customer, invoice)

Parameters:
invoice -
acceptInfo -

infer

public void infer(Customer customer,
                  Invoice invoice)
If the credit limit of the customer is greater than the amount of the invoice and the status of the invoice is unpaid then decrement the credit limit with the amount of invoice and set the status of the invoice to paid.

Parameters:
customer -
invoice -


Copyright © 2006 Hammurapi Group. All Rights Reserved.