/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  org.springframework.dao.DataAccessException
 *  org.springframework.jdbc.core.ResultSetExtractor
 */
package com.l7tech.server.jdbc;

import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.ResultSetExtractor;

class p
implements ResultSetExtractor<Map<String, List<Object>>> {
    private p() {
    }

    public Map<String, List<Object>> extractData(ResultSet resultSet) throws SQLException, DataAccessException {
        HashMap<String, List<Object>> hashMap = new HashMap<String, List<Object>>();
        ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
        int n2 = resultSetMetaData.getColumnCount();
        while (resultSet.next()) {
            for (int i2 = 1; i2 <= n2; ++i2) {
                Object object;
                int n3;
                String string = resultSetMetaData.getColumnLabel(i2).toLowerCase();
                ArrayList<Object> arrayList = (ArrayList<Object>)hashMap.get(string);
                if (arrayList == null) {
                    arrayList = new ArrayList<Object>();
                    hashMap.put(string, arrayList);
                }
                if ((n3 = resultSet.getMetaData().getColumnType(i2)) == 2005) {
                    String string2;
                    var10_10 = resultSet.getClob(i2);
                    try {
                        string2 = var10_10 == null ? null : var10_10.getSubString(1L, (int)var10_10.length());
                    }
                    catch (SQLException sQLException) {
                        throw p.a(sQLException);
                    }
                    object = string2;
                } else if (n3 == 2004) {
                    byte[] byArray;
                    var10_10 = resultSet.getBlob(i2);
                    try {
                        byArray = var10_10 == null ? null : var10_10.getBytes(1L, (int)var10_10.length());
                    }
                    catch (SQLException sQLException) {
                        throw p.a(sQLException);
                    }
                    object = byArray;
                } else {
                    object = resultSet.getObject(i2);
                }
                arrayList.add(object);
            }
        }
        return hashMap;
    }

    private static SQLException a(SQLException sQLException) {
        return sQLException;
    }
}

