java.util.Enumeration Descriptor Schema Actions ESQL user-list

Modular Database Actions


The intention is to factor out those parts that are dependent on the utilised DBMS as well as the methods used to obtain the values and communicate results. Therefore three classes of modules exist:

  1. Input Modules read data from some source (e.g. the request object or session attributes or whatever)
  2. Output Modules send the data to an arbitrary destination. Again, this could be request attributes or anything else. When the database transaction finishes, it is signalled to them whether the transaction succeeded or failed.
  3. Database Modules determine the value of a key attribute column in a database if it's is of auto increment type. This could be by querying the database, reading from an arbitrary source (e.g. request object) or just skipping the column when inserting a row and querying the database afterwards. This needs to be done e.g. for Informix's SERIAL or HSQLDB's IDENTITY column types.

Current database content

personnel

select * from user order by name, firstname, uname, uid

select * from groups order by gname

select user.uid, user.uname, groups.gid, groups.gname from user, user_groups, groups where user.uid=user_groups.uid and user_groups.gid=groups.gid order by user.uname, groups.gname


Status Information

Request Attributes

{ Enumeration e=request.getAttributeNames(); while ( e.hasMoreElements() ) { String attribute = (String) e.nextElement(); Object value = request.getAttribute(attribute); } }
attribute ="value"

Request Parameters

{ Enumeration e=request.getParameterNames(); while ( e.hasMoreElements() ) { String attribute = (String) e.nextElement(); Object[] value = request.getParameterValues(attribute); for (int i=0; i < value.length; i++) { } } }
attribute[i] ="value[i]"