select *
  from (select 'try {' || 'bean.set' || upper(substr(a.COLUMN_NAME, 1, 1)) ||
               lower(substr(a.column_name, 2)) || '(' || '(' || case
                 when a.data_type like '%CHAR%' then
                  'String'
                 when a.data_type like '%DATE%' then
                  'java.util.Date'
                 when a.data_type like '%TIME%' then
                  'java.util.Date'
                 when a.data_type like '%NUM%' then
                  'Double'
                 when a.data_type like '%LONG%' then
                  'Double'
                 else
                  'String'
               end || ')' || 'hs.get(' || '"' || a.COLUMN_NAME || '"' || ')' ||
               ') ;' || ' } catch(java.lang.Exception ex ) {}' hstb,
               'try {' || 'bean.set' || upper(substr(a.COLUMN_NAME, 1, 1)) ||
               lower(substr(a.column_name, 2)) || '(' || '(' || case
                 when a.data_type like '%CHAR%' then
                  'String'
                 when a.data_type like '%DATE%' then
                  'java.util.Date'
                 when a.data_type like '%TIME%' then
                  'java.util.Date'
                 when a.data_type like '%NUM%' then
                  '(java.math.BigDecimal'
                 when a.data_type like '%LONG%' then
                  '(java.math.BigDecimal'
                 else
                  'String'
               end || ')' || 'set.getObject(' || '"' || a.COLUMN_NAME || '"' || ')' ||
               ') ;' || ' } catch(java.lang.Exception ex ) {}' resset,
               'private   ' || case
                 when a.data_type like '%CHAR%' then
                  'String'
                 when a.data_type like '%DATE%' then
                  'java.util.Date'
                 when a.data_type like '%TIME%' then
                  'java.util.Date'
                 when a.data_type like '%NUM%' then
                  'Double'
                 when a.data_type like '%LONG%' then
                  'Double'
                 else
                  'String'
               end || '  ' || upper(substr(a.COLUMN_NAME, 1, 1)) ||
               lower(substr(a.column_name, 2)) || ' = ' || case
                 when a.data_type like '%CHAR%' then
                  '""'
                 when a.data_type like '%DATE%' then
                  'null'
                 when a.data_type like '%TIME%' then
                  'null'
                 when a.data_type like '%NUM%' then
                  '0.0'
                 when a.data_type like '%LONG%' then
                  '0.0'
                 else
                  '""'
               end || ';' col,
               case
                 when a.data_type like '%CHAR%' then
                  'sb.append("' || '''' || '").append('
                 when a.data_type like '%DATE%' then
                  'sb.append(super.GetSqlDateFormatByDateValue('
                 when a.data_type like '%TIME%' then
                  'sb.append(super.GetSqlDateFormatByDateValue('
                 when a.data_type like '%NUM%' then
                  'sb.append('
                 when a.data_type like '%LONG%' then
                  'sb.append('
                 else
                  'sb.append("' || '''' || '").append('
               end || 'bean.get' || upper(substr(a.COLUMN_NAME, 1, 1)) ||
               lower(substr(a.column_name, 2)) || '()' || ')' || '' || case
                 when a.data_type like '%CHAR%' then
                  '.append("' || '''' || ',")'
                 when a.data_type like '%DATE%' then
                  ')' || '.append("' || ',' || '")'
                 when a.data_type like '%TIME%' then
                  ',)'
                 when a.data_type like '%NUM%' then
                  '.append("' || ',' || '")'
                 when a.data_type like '%LONG%' then
                  ',)'
                 else
                  '.append("' || '''' || ',")'
               end || ';' insertt,
               
               ' sb.append( ' || '"' || a.COLUMN_NAME || ', "' || ');' ccc,
               
               ' sb.append( ' || '"' || a.COLUMN_NAME || ' = ' || '")' || case
                 when a.data_type like '%CHAR%' then
                  '.append("' || '''' || '").append('
                 when a.data_type like '%DATE%' then
                  '.append(super.GetSqlDateFormatByDateValue('
                 when a.data_type like '%TIME%' then
                  '.append(super.GetSqlDateFormatByDateValue('
                 when a.data_type like '%NUM%' then
                  '.append('
                 when a.data_type like '%LONG%' then
                  '.append('
                 else
                  '.append("' || '''' || '").append('
               end || 'bean.get' || upper(substr(a.COLUMN_NAME, 1, 1)) ||
               lower(substr(a.column_name, 2)) || '()' || ')' || '' || case
                 when a.data_type like '%CHAR%' then
                  '.append("' || '''' || ','
                 when a.data_type like '%DATE%' then
                  ')' || '.append("' || ',' || ''
                 when a.data_type like '%TIME%' then
                  ')' || '.append("' || ',' || ''
                 when a.data_type like '%NUM%' then
                  '.append("' || ',' || ''
                 when a.data_type like '%LONG%' then
                  ',)'
                 else
                  '.append("' || '''' || ',")'
               end || '"' || ');' updatet,'sb.append('||'"'||'? ,'||'" '||');' sba,'bean.get' || upper(substr(a.COLUMN_NAME, 1, 1)) ||
               lower(substr(a.column_name, 2)) || '(),' || ''  beanget, ' sb.append( ' || '"' || a.COLUMN_NAME || ' =  ?  ,' || '")' 
          from user_tab_columns a
         where a.table_name = 'SLM_BALANCEINFO'
         order by a.column_id asc);
         
         public static List<SlmBalanceInfoBean> convertResultSetToBeanList(
			ResultSet set) throws SQLException
	{
		List<SlmBalanceInfoBean> listbean = new ArrayList<SlmBalanceInfoBean>();
		SlmBalanceInfoBean bean = null;

		while (set.next())
		{
			bean = new SlmBalanceInfoBean();
			listbean.add(bean);
		}

		try
		{
			set.close();

		}
		catch (java.lang.Exception ex)
		{
		}
		return (listbean.size() == 0 ) ? null : listbean;
	}
	
	public static SlmBalanceTransMoney convertHashMapToBean(HashMap hs)
	{
		SlmBalanceTransMoney bean = new SlmBalanceTransMoney();
		return bean;
		}
		
		import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;