All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class benno.account.db.Bundle

java.lang.Object
   |
   +----benno.account.db.Bundle

public final class Bundle
extends Object
This class holds all of the sets and lists of accounts, transactions, currencies, etc, as static members, so that they can be referenced from anywhere. Bugs: DBChangedListener handling - objects are not deregistering themselves from the list that Bundle holds - therefore they are not garbage collected, and code is slowed down.

Version:
$Revision: 1.15.6.1 $
Author:
Ben Clifford

Variable Index

 o accs
 o curs
 o exchs
 o grps
 o stds
 o trans

Constructor Index

 o Bundle()

Method Index

 o addDBChangedListener(DBChangedListener)
 o create()
this allocates new structures to each static member, if a new data set is desired, instead of loading a previous one.
 o getDirty()
 o load(String)
this deserializes a file serialised with the save member
 o removeDBChangedListener(DBChangedListener)
 o save(String)
this serializes the static members out to supplied filename
 o setChanged()
this function is to be called by, eg.
 o setDirty()
this takes no args, because we do not want arbitary code to be able to undirty.

Variables

 o trans
 public static TransactionList trans
 o accs
 public static AccountList accs
 o curs
 public static CurrencyList curs
 o stds
 public static StandingOrderList stds
 o exchs
 public static ExchangeRateList exchs
 o grps
 public static AccountGroupList grps

Constructors

 o Bundle
 public Bundle()

Methods

 o save
 public static void save(String filename)
this serializes the static members out to supplied filename

 o load
 public static void load(String filename) throws BundleNotExistException
this deserializes a file serialised with the save member

 o create
 public static void create()
this allocates new structures to each static member, if a new data set is desired, instead of loading a previous one.

 o setDirty
 public static void setDirty()
this takes no args, because we do not want arbitary code to be able to undirty.

 o setChanged
 public static void setChanged()
this function is to be called by, eg. GUI components when they have completed a series of changes to the database, to cause other components to refresh with the new data.

 o getDirty
 public static boolean getDirty()
 o addDBChangedListener
 public static void addDBChangedListener(DBChangedListener d)
 o removeDBChangedListener
 public static void removeDBChangedListener(DBChangedListener d)

All Packages  Class Hierarchy  This Package  Previous  Next  Index