Re: Tracking changes in some central database by multiple objects scattered around the program



jb wrote:
Hi!
I've been writing a program that operates on small hand-made database.
And I would like other objects to track changes in this database
possibly in the swing way i.e:


class DataBase {
private List listeners =new ArrayList();

public void addActionListner(ActionListener foo){
listeners.put(foo);
}

public void changePartOfDatabase{
fireActionPerformed();
}

private void fireActionPerformed() {
for (int index = 0; index < listeners.length(); index++) {
ActionListener listener = (ActionListener)listeners.get(index);
listener.actionPerformed();
}
}

}


Other objects interested in tracking changes would just add new
Listener.

I suspect that there is a class from I could inherit such functions -
but I hadn't been able to find it. ;-(. If there is please drop me some
keywords so I could google for it, if there is not please tell me how
to write such a thing by myself.

.



Relevant Pages

  • Re: Elephant experiences?
    ... SQL database doesn't not need to be heavy -- SQLite is an example, it is something like 200KB of source code and it supports most features one might want. ... Maybe it was saying that it cannot automatically track changes in those collections -- obviously it can't do that without hijacking CL implementation. ... It can only track changes to persistent objects and persistent collections. ... And if you hate objects, you can use "btrees", which are just like hash-tables, but are persisted. ...
    (comp.lang.lisp)
  • Re: Storing word documents, spreadsheets... in SQL database
    ... >What are the disadvantages of storing BLOBs in the database? ... >By the way,it is not a homework assignment! ... >We also want to track changes to the document, and we have to know who ... Store the path instead. ...
    (microsoft.public.vb.database)
  • Re: security in development environnement
    ... I would suggest that you use a version control system to hold the SQL to ... Therefore you can track changes and who does them. ... > the database objects like tables in a developpement ... > Developpers are able to manage all data but not able to ...
    (microsoft.public.sqlserver.security)
  • Audit Log
    ... I need to be able to track changes on records in a database, ... database showing the before value and after value plus the field name. ... Petrus ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: newbie - jdbc Problem
    ... You can not return the resultset which open connection to the database, ... private String dbDriver, dbURL, dbUser, dbPassword; ... } catch (SQLException e) ... public void closeStatement() ...
    (comp.lang.java.programmer)