com.pow2.dbforms
Class DbFormsUtil

java.lang.Object
  extended bycom.pow2.dbforms.DbFormsUtil

public class DbFormsUtil
extends Object

Utility class for DBForms applications.

Author:
Luca Fossato

Constructor Summary
DbFormsUtil()
           
 
Method Summary
static Hashtable getHt(HttpServletRequest request, String tableId, String id)
          Build an hashTable object used to position the DbForms recordset to the record whose key match the hashTable tableId value
See dbform::gotoHt attribute for further details.
static Hashtable getHt(HttpSession session, String tableId, String id)
          Build an hashTable object used to position the DbForms recordset to the record whose key match the hashTable tableId value
See dbform::gotoHt attribute for further details.
static String getValue(Map map, String field)
          Get the value of the field contained into the input mapS.
static String getValue(Map map, String field, String defaultValue)
          Get the value of the field contained into the input map object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbFormsUtil

public DbFormsUtil()
Method Detail

getHt

public static Hashtable getHt(HttpServletRequest request,
                              String tableId,
                              String id)
Build an hashTable object used to position the DbForms recordset to the record whose key match the hashTable tableId value
See dbform::gotoHt attribute for further details.

Parameters:
request - the HttpRequest object
tableId - the table single key field name
id - the request attribute/parameter name to use as the table key
Returns:
the hashTable object used to position the DbForm recordset to the record whose key match the hashTable tableId value

getHt

public static Hashtable getHt(HttpSession session,
                              String tableId,
                              String id)
Build an hashTable object used to position the DbForms recordset to the record whose key match the hashTable tableId value
See dbform::gotoHt attribute for further details.

Parameters:
session - the HttpSession object
tableId - the table single key field name
id - the request attribute/parameter name to use as the table key
Returns:
the hashTable object used to position the DbForm recordset to the record whose key match the hashTable tableId value

getValue

public static String getValue(Map map,
                              String field,
                              String defaultValue)
Get the value of the field contained into the input map object.

Parameters:
map - the map containing the field object
field - the field to check
defaultValue - the default value to return if the map or its field are null
Returns:
the value of the field contained into the input map, or defaultValue if the input map or its field are null

getValue

public static String getValue(Map map,
                              String field)
Get the value of the field contained into the input mapS.

Parameters:
map - the map containing the field object
field - the field to check
Returns:
the value of the field contained into the input map


Copyright © 2002-2004 Power Of Two S.R.L. All Rights Reserved.