Save This Page
Home » apache-openjpa-1.1.0-source » org.apache.openjpa.lib » jdbc » [javadoc | source]
org.apache.openjpa.lib.jdbc
public class: LoggingConnectionDecorator [javadoc | source]
java.lang.Object
   org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator

All Implemented Interfaces:
    ConnectionDecorator

A ConnectionDecorator that creates logging connections and ReportingSQLException s.
Nested Class Summary:
public static interface  LoggingConnectionDecorator.SQLWarningHandler  Interface that allows customization of what to do when {@link SQLWarning}s occur. 
Method from org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator Summary:
decorate,   getLogs,   getPrettyPrint,   getPrettyPrintLineLength,   getTrackParameters,   getWarningAction,   getWarningHandler,   setPrettyPrint,   setPrettyPrintLineLength,   setTrackParameters,   setWarningAction,   setWarningHandler
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator Detail:
 public Connection decorate(Connection conn) throws SQLException 
 public DataSourceLogs getLogs() 
    The log to write to.
 public boolean getPrettyPrint() 
 public int getPrettyPrintLineLength() 
 public boolean getTrackParameters() 
    Whether to track parameters for the purposes of reporting exceptions.
 public String getWarningAction() 
    What to do with SQL warnings.
 public LoggingConnectionDecorator.SQLWarningHandler getWarningHandler() 
    What to do with SQL warnings.
 public  void setPrettyPrint(boolean prettyPrint) 
    If set to true, pretty-print SQL by running it through SQLFormatter#prettyPrint . If false, don't pretty-print, and output SQL logs in a single line. Pretty-printed SQL can be easier for a human to read, but is harder to parse with tools like grep.
 public  void setPrettyPrintLineLength(int length) 
    The number of characters to print per line when pretty-printing of SQL is enabled. Defaults to 60 to provide some space for any ant-related characters on the left of a standard 80-character display.
 public  void setTrackParameters(boolean trackParameters) 
    Whether to track parameters for the purposes of reporting exceptions.
 public  void setWarningAction(String warningAction) 
    What to do with SQL warnings.
 public  void setWarningHandler(LoggingConnectionDecorator.SQLWarningHandler warningHandler) 
    What to do with SQL warnings.