Code example for Connection

Methods: prepareStatement

0
    public static PreparedStatement getPS(Connection connection, ThreadLocal<PreparedStatement> psMap, String query) throws SQLException
    { 
        PreparedStatement ps = psMap.get();
        if (ps == null)
        { 
        	ps = connection.prepareStatement(query);
            psMap.set(ps);
        } 
        return ps;
    } 
     
    /** 
     *  
     * @param connection 
     * @param psMap 
     * @param query 
     * @param resultSetType 
     * @param resultSetConcurrency 
     * @return 
     * @throws SQLException