Package com.bleujin.framework.util

Examples of com.bleujin.framework.util.CaseInsensitiveHashMap


        String[] names = getColumnsNames(rs);
        int columnSize = names.length;

        rs.beforeFirst();
        while(rs.next()) {
            HashMap map = new CaseInsensitiveHashMap();
            ArrayList row = RowsUtils.getCurrentTuple(rs);

            for(int i = 0; i < columnSize; ++i) {
                map.put(names[i], row.get(i));
            }

            maps.add(map);
        }
View Full Code Here


        String[] names = getColumnsNames(rs);
        int columnSize = names.length;

        rs.beforeFirst();
        while(rs.next()) {
            HashMap map = new CaseInsensitiveHashMap();

            ArrayList row = RowsUtils.getCurrentTuple(rs);

            for(int i = 0; i < columnSize; ++i) {
                Object o = row.get(i);
                if(o == null)o = ""; // ���� null�� ��� ""�� �ִ´�.

                map.put(names[i], o);
            }

            maps.add(map);
        }
View Full Code Here

     *
     * @return
     * @throws SQLException
     */
    public synchronized HashMap transformIntoHashMap() throws SQLException {
        HashMap map = new CaseInsensitiveHashMap();
        String[] names = getColumnsNames();
        int columnSize = names.length;
        ArrayList row = RowsUtils.getCurrentTuple(rows);

        for(int i = 0; i < columnSize; ++i) {
            map.put(names[i], row.get(i));
        }

        return map;
    }
View Full Code Here

        return map;
    }

    public synchronized HashMap transformIntoHashMapWithoutNull() throws SQLException {
        HashMap map = new CaseInsensitiveHashMap();
        String[] names = getColumnsNames();
        int columnSize = names.length;
        ArrayList row = RowsUtils.getCurrentTuple(rows);

        for(int i = 0; i < columnSize; ++i) {
            Object o = row.get(i);
            if(o == null)o = "";

            map.put(names[i], o);
        }

        return map;
    }
View Full Code Here

    }

    // current row -> Map
    public static Map currentRowToMap(RowSet rows) {
        try {
            Map result = new CaseInsensitiveHashMap();
            ResultSetMetaData rsmd = rows.getMetaData();
            int cols = rsmd.getColumnCount();

            for(int i = 1; i <= cols; i++) {
                result.put(rsmd.getColumnName(i), getValue(rows, i, rsmd));
            }

            return result;
        } catch(SQLException ex) {
            throw RepositoryException.throwIt(ex) ;
View Full Code Here

            Vector v = new Vector();
            ResultSetMetaData rsmd = rows.getMetaData();
            int cols = rsmd.getColumnCount();

            while(rows.next()) {
                Map map = new CaseInsensitiveHashMap();
                for(int i = 1; i <= cols; i++) {
                    map.put(rsmd.getColumnName(i), getValue(rows, i, rsmd));
                }
                v.add(map);
            }

            return(Map[])v.toArray(new Map[0]);
View Full Code Here

            Vector v = new Vector();
            ResultSetMetaData rsmd = rows.getMetaData();
            int cols = rsmd.getColumnCount();

            while(rows.next()) {
                Map map = new CaseInsensitiveHashMap();
                for(int i = 1; i <= cols; i++) {
                    map.put(rsmd.getColumnName(i), getNullObjectValue(rows, i, rsmd));
                }
                v.add(map);
            }

            return(Map[])v.toArray(new Map[0]);
View Full Code Here

TOP

Related Classes of com.bleujin.framework.util.CaseInsensitiveHashMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.