com.pow2.dao
Class HTMLDAO

java.lang.Object
  extended bycom.pow2.dao.AbstractDAO
      extended bycom.pow2.dao.HTMLDAO

public class HTMLDAO
extends AbstractDAO

HTML Data driven element builder

Version:
$Id: HTMLDAO.java,v 1.1.1.1 2004/08/31 20:22:46 foxat Exp $
Author:
Luca Fossato

Field Summary
 
Fields inherited from class com.pow2.dao.AbstractDAO
cat
 
Constructor Summary
protected HTMLDAO()
          Default private constructor.
 
Method Summary
 String getSelectOptions(String table, String idField, String descField, String selectedIndex)
          Get the String representation of an HTML select options list retrieving the option value and description parameters from the input table.
 String getSelectOptions(String table, String idField, String descField, String condition, String selectedIndex)
          Get the String representation of an HTML select options list retrieving the option value and description parameters from the input table.
 String getSelectOptions(String table, String idField, String descField, String condition, String orderBy, String selectedIndex)
          Get the String representation of an HTML select options list retrieving the option value and description parameters from the input table.
static HTMLDAO instance()
          Get the unique instance of HTMLDAO class.
 
Methods inherited from class com.pow2.dao.AbstractDAO
assertion, closeResources, closeResources, closeResources, count, count, delete, delete, encode, getConnection, getConnection, getNewKey, isDebugEnabled, populate, setLike, setLike
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLDAO

protected HTMLDAO()
Default private constructor.

Method Detail

instance

public static HTMLDAO instance()
Get the unique instance of HTMLDAO class.

Returns:
the instance of HTMLDAO class

getSelectOptions

public String getSelectOptions(String table,
                               String idField,
                               String descField,
                               String selectedIndex)
                        throws Exception
Get the String representation of an HTML select options list retrieving the option value and description parameters from the input table.
The options list is ordered by the descField field vale.

Parameters:
table - the table name where to retrieve the records
idField - the name of the value field
descField - the name of the description field
selectedIndex - the value used to set the selected attribute to the option element whose value matches this entry
Returns:
The selectOptions value
Throws:
Exception - Description of the Exception

getSelectOptions

public String getSelectOptions(String table,
                               String idField,
                               String descField,
                               String condition,
                               String selectedIndex)
                        throws Exception
Get the String representation of an HTML select options list retrieving the option value and description parameters from the input table.
The options list is ordered by the descField field vale.

Parameters:
table - the table name where to retrieve the records
idField - the name of the value field
descField - the name of the description field
condition - the SQL WHERE condition
selectedIndex - the value used to set the selected attribute to the option element whose value matches this entry
Returns:
The selectOptions value
Throws:
Exception - Description of the Exception

getSelectOptions

public String getSelectOptions(String table,
                               String idField,
                               String descField,
                               String condition,
                               String orderBy,
                               String selectedIndex)
                        throws Exception
Get the String representation of an HTML select options list retrieving the option value and description parameters from the input table.

Parameters:
table - the table name where to retrieve the records
idField - the name of the value field
descField - the name of the description field
condition - the SQL WHERE condition
orderBy - the SQL ORDERBY statement
selectedIndex - the value used to set the selected attribute to the option element whose value matches this entry
Returns:
The selectOptions value
Throws:
Exception - Description of the Exception


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