The abstract factory contains a listing of all the java/sql field mappings, the table name, and pre-coded insert, update, and delete strings. Abstract routines from FactoryBase like (getTableName(), etc.) are implemented.3.8 Also found are the names of the generated stored procedure name and how to call it (if the '-procs' switch was used in generation). The methods getByOid, and store are also implmented.
The next step is the declared factory. One needs to define a factory (usually class-nameFactory), to extend the abstract Factory and implement any methods you need. To UserFactory we would write any desired queries as follows.
public User getUserById (DatabaseSession dbSess, String id) throws SQLException { return (User)super.getObject (dbSess, super.userId, id); }It's that simple.