uk.ac.kcl.cch.jb.pliny.model
Class DBServices

java.lang.Object
  extended byuk.ac.kcl.cch.rdb2java.dynData.PropertyChangeObject
      extended byuk.ac.kcl.cch.jb.pliny.model.DBServices
All Implemented Interfaces:
IPropertyChangeObject

public class DBServices
extends PropertyChangeObject

provides linking services between the DB engine and the rdb2java model objects. This version, which supports an embedded link to the Derby database can also set up the tables in the DB when it is first created.

Author:
John Bradley

Field Summary
static int ACCOUNT
           
static int GENERAL
           
static int UNDEFINED
           
 
Constructor Summary
DBServices()
          Creates new DBObjectFactory
 
Method Summary
static void closeConnection()
           
static Connection getConnection()
           
static String getNewKeyQuery(String tableName)
           
 void notifyCreate(String type, Object object)
           
 void notifyDelete(String type, Object object)
           
static void returnConnection(Connection c)
           
static void setDBName(String dbName)
           
 
Methods inherited from class uk.ac.kcl.cch.rdb2java.dynData.PropertyChangeObject
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNDEFINED

public static final int UNDEFINED
See Also:
Constant Field Values

GENERAL

public static final int GENERAL
See Also:
Constant Field Values

ACCOUNT

public static final int ACCOUNT
See Also:
Constant Field Values
Constructor Detail

DBServices

public DBServices()
Creates new DBObjectFactory

Method Detail

getConnection

public static Connection getConnection()

returnConnection

public static void returnConnection(Connection c)

setDBName

public static void setDBName(String dbName)

closeConnection

public static void closeConnection()

getNewKeyQuery

public static String getNewKeyQuery(String tableName)

notifyCreate

public void notifyCreate(String type,
                         Object object)

notifyDelete

public void notifyDelete(String type,
                         Object object)