|
From: Pelle B. <pe...@us...> - 2004-03-25 16:55:11
|
Update of /cvsroot/neuclear/neuclear-ledger/src/java/org/neuclear/ledger In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8437/src/java/org/neuclear/ledger Modified Files: Ledger.java Log Message: Added getTestBalance() and isBalanced() to Ledger to see if ledger is balanced. The hibernate implementation has changed the comment size to 255 to work with mysql and now has included hibernates full hibernate.properties to make it easier to try various databases. It has now been tested with hsql and mysql. Index: Ledger.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-ledger/src/java/org/neuclear/ledger/Ledger.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Ledger.java 23 Mar 2004 22:01:43 -0000 1.13 --- Ledger.java 25 Mar 2004 16:44:22 -0000 1.14 *************** *** 4,7 **** --- 4,13 ---- * $Id$ * $Log$ + * Revision 1.14 2004/03/25 16:44:22 pelle + * Added getTestBalance() and isBalanced() to Ledger to see if ledger is balanced. + * The hibernate implementation has changed the comment size to 255 to work with mysql and now + * has included hibernates full hibernate.properties to make it easier to try various databases. + * It has now been tested with hsql and mysql. + * * Revision 1.13 2004/03/23 22:01:43 pelle * Bumped version numbers for commons and xmlsig througout. *************** *** 264,267 **** --- 270,278 ---- public abstract PostedHeldTransaction findHeldTransaction(String idstring) throws LowlevelLedgerException, UnknownTransactionException; + public abstract double getTestBalance() throws LowlevelLedgerException; + + public final boolean isBalanced() throws LowlevelLedgerException { + return getTestBalance() == 0; + } public final PostedTransaction transfer(String req, String id, String from, String to, double amount, String comment) throws InvalidTransactionException, LowlevelLedgerException, UnBalancedTransactionException { |