|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.openjpa.lib.jdbc.LoggingConnectionDecorator
public class LoggingConnectionDecorator
A ConnectionDecorator
that creates logging connections and
ReportingSQLException
s.
Nested Class Summary | |
---|---|
static interface |
LoggingConnectionDecorator.SQLWarningHandler
Interface that allows customization of what to do when SQLWarning s occur. |
Constructor Summary | |
---|---|
LoggingConnectionDecorator()
|
Method Summary | |
---|---|
Connection |
decorate(Connection conn)
Decorate the given connection if desired. |
DataSourceLogs |
getLogs()
The log to write to. |
boolean |
getPrettyPrint()
|
int |
getPrettyPrintLineLength()
|
boolean |
getTrackParameters()
Whether to track parameters for the purposes of reporting exceptions. |
String |
getWarningAction()
What to do with SQL warnings. |
LoggingConnectionDecorator.SQLWarningHandler |
getWarningHandler()
What to do with SQL warnings. |
void |
setPrettyPrint(boolean prettyPrint)
If set to true , pretty-print SQL by running it
through SQLFormatter.prettyPrint(java.lang.Object) . |
void |
setPrettyPrintLineLength(int length)
The number of characters to print per line when pretty-printing of SQL is enabled. |
void |
setTrackParameters(boolean trackParameters)
Whether to track parameters for the purposes of reporting exceptions. |
void |
setWarningAction(String warningAction)
What to do with SQL warnings. |
void |
setWarningHandler(LoggingConnectionDecorator.SQLWarningHandler warningHandler)
What to do with SQL warnings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LoggingConnectionDecorator()
Method Detail |
---|
public void setPrettyPrint(boolean prettyPrint)
true
, pretty-print SQL by running it
through SQLFormatter.prettyPrint(java.lang.Object)
. 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 boolean getPrettyPrint()
setPrettyPrint(boolean)
public void setPrettyPrintLineLength(int length)
public int getPrettyPrintLineLength()
setPrettyPrintLineLength(int)
public void setTrackParameters(boolean trackParameters)
public boolean getTrackParameters()
public void setWarningAction(String warningAction)
public String getWarningAction()
public void setWarningHandler(LoggingConnectionDecorator.SQLWarningHandler warningHandler)
public LoggingConnectionDecorator.SQLWarningHandler getWarningHandler()
public DataSourceLogs getLogs()
public Connection decorate(Connection conn) throws SQLException
ConnectionDecorator
decorate
in interface ConnectionDecorator
SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This documentation is deprecated and will be removed in the next release of WebLogic Server.