The DBBean Framework
The Main Objects

com.sidman.db.DB

One DB object is required for each actual database. One instance of this object should be created at application startup and used throughout the application. Consult the JavaDocs for the constructor parameters, which include things like the driver, URL, username and password for the database..

The DB object manipulates DBBean objects:

DB myDB = new DB([args]);
DBBean mBean = new MyBeanClass();
DBBean[] mArray = DB.selectBean(mBean);

com.sidman.db.DBBean

DBBean objects represent a view into the database. One DBBean object represents one row from a SQL select statement. It may be from one table or an inner or outer join of many tables. There are currently three subclasses of the base DBBean class:

  1. com.sidman.db.SingleTablePkBean - A single table with one primary key column
  2. com.sidman.db.InnerJoinPkBean - An inner join of two or more tables represented by SingleTablePKBeans
  3. com.sidman.db.OuterJoinPkBean - An outer join of exactly two tables represented by SingleTablePkBeans
A utility method of the DB object automatically generates SingleTablePkBean java files for all of the tables in the database.