com.jolbox.bonecp
Class PoolUtil

java.lang.Object
  extended by com.jolbox.bonecp.PoolUtil

public class PoolUtil
extends Object

A bunch of generic routines used internally by the pool.

Author:
wallacew

Constructor Summary
PoolUtil()
           
 
Method Summary
static String fillLogParams(String sql, Map<Object,Object> logParams)
          Returns sql statement used in this prepared statement together with the parameters.
protected static String prettyPrint(Object obj)
          Helper method
protected static String safePrint(Object... o)
          Helper method
static String stringifyException(Throwable t)
          For backwards compatibility with JDK1.5 (SQLException doesn't accept the original exception).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PoolUtil

public PoolUtil()
Method Detail

fillLogParams

public static String fillLogParams(String sql,
                                   Map<Object,Object> logParams)
Returns sql statement used in this prepared statement together with the parameters.

Parameters:
sql - base sql statement
logParams - parameters to print out
Returns:
returns printable statement

safePrint

protected static String safePrint(Object... o)
Helper method

Parameters:
o - items to print
Returns:
String for safe printing.

prettyPrint

protected static String prettyPrint(Object obj)
Helper method

Parameters:
obj - item to print
Returns:
String for pretty printing.

stringifyException

public static String stringifyException(Throwable t)
For backwards compatibility with JDK1.5 (SQLException doesn't accept the original exception).

Parameters:
t - exception
Returns:
printStackTrace converted to a string


Copyright © 2009-2011 JolBox. All Rights Reserved.