private String buildSelectClause ( ) { StringBuilder sqlBuf = new StringBuilder ( ) ; sqlBuf . append ( "SELECT " ) ; String column = null ; for ( Enumeration select = mColumns . elements ( ) ; select . hasMoreElements ( ) ; ) { column = ( String ) select . nextElement ( ) ; /* String subColumn = column.substring(column.indexOf(".") + 1); // System.err.println("DEBUG: col=" + subColumn); String mapType = (String) mMapTypes.get(mColumnMap.get(subColumn)); */ String mapType = ( String ) mMapTypes . get ( getProperty ( column ) ) ; if ( mapType == null || mapType . equals ( DIRECTMAP ) ) { sqlBuf . append ( column ) ; sqlBuf . append ( select . hasMoreElements ( ) ? ", " : " " ) ; } } return sqlBuf . toString ( ) ; }
Builds a SQL SELECT clause from the columns Vector