org.makumba.Database
Should use org.makumba.Transaction instead This class models operations with a database. To obtain such
an object, use methods from MakumbaSystem .
Stricly speaking this class represents a database connection (later on, transaction). Obtaining more such
objects for the same database configurations will result in opening more connections. Connections must be
given back to the system using the Database.close() method. That will be done automatically by the
object's finalizer. In makumba business logic, connections passed to the BL methods are automatically
closed by the system after the BL operations (including eventual automatic DB acceses) were completed. To
open a "sibling" of a connection conn of this type, use
MakumbaSystem.getConnectionTo(conn.getName()). In most cases, you will have to close the sibling
yourself.
At the level of this API, data is represented as java.util.Dictionary, both for reading and writing. Most
methods throw DBError if a fatal database error occurs. If the connection to the database is
lost, an attempt is made to reconnect before throwing a DBError .
All methods throw subclasses of either Error or RuntimeException, so nothing needs to be caught
explicitely. |