The base class for objects that can print trace information about themselves.
| Methods |
| static int |
getNextId(int type)
Get the next trace object id for this object type.
|
| static int |
getNextId(int type)
Get the next trace object id for this object type.
Parameters:
type - the object type
Returns:
the new trace object id
|
| static String |
quote(String s)
Format a string as a Java string literal.
|
| static String |
quote(String s)
Format a string as a Java string literal.
Parameters:
s - the string to convert
Returns:
the Java string literal
|
| static String |
quoteArray(String[] s)
Format a string array to the Java source code that represents this
object.
|
| static String |
quoteArray(String[] s)
Format a string array to the Java source code that represents this
object.
Parameters:
s - the string array to convert
Returns:
the Java source code
|
| static String |
quoteBigDecimal(BigDecimal x)
Format a big decimal to the Java source code that represents this object.
|
| static String |
quoteBigDecimal(BigDecimal x)
Format a big decimal to the Java source code that represents this object.
Parameters:
x - the big decimal to convert
Returns:
the Java source code
|
| static String |
quoteBytes(byte[] x)
Format a byte array to the Java source code that represents this object.
|
| static String |
quoteBytes(byte[] x)
Format a byte array to the Java source code that represents this object.
Parameters:
x - the byte array to convert
Returns:
the Java source code
|
| static String |
quoteDate(Date x)
Format a date to the Java source code that represents this object.
|
| static String |
quoteDate(Date x)
Format a date to the Java source code that represents this object.
Parameters:
x - the date to convert
Returns:
the Java source code
|
| static String |
quoteIntArray(int[] s)
Format an int array to the Java source code that represents this object.
|
| static String |
quoteIntArray(int[] s)
Format an int array to the Java source code that represents this object.
Parameters:
s - the int array to convert
Returns:
the Java source code
|
| static String |
quoteMap(Map map)
Format a map to the Java source code that represents this object.
|
| static String |
quoteMap(Map map)
Format a map to the Java source code that represents this object.
Parameters:
map - the map to convert
Returns:
the Java source code
|
| static String |
quoteTime(Time x)
Format a time to the Java source code that represents this object.
|
| static String |
quoteTime(Time x)
Format a time to the Java source code that represents this object.
Parameters:
x - the time to convert
Returns:
the Java source code
|
| static String |
quoteTimestamp(Timestamp x)
Format a timestamp to the Java source code that represents this object.
|
| static String |
quoteTimestamp(Timestamp x)
Format a timestamp to the Java source code that represents this object.
Parameters:
x - the timestamp to convert
Returns:
the Java source code
|
| void |
debugCode(String text)
Write trace information in the form objectName.text.
|
| void |
debugCode(String text)
Write trace information in the form objectName.text.
Parameters:
text - the trace text
|
| void |
debugCodeAssign(String className, int newType, int newId, String value)
Write trace information as an assignment in the form
className prefixId = objectName.value.
|
| void |
debugCodeAssign(String className, int newType, int newId, String value)
Write trace information as an assignment in the form
className prefixId = objectName.value.
Parameters:
className - the class name of the result
newType - the prefix type
newId - the trace object id of the created object
value - the value to assign this new object to
|
| void |
debugCodeCall(String methodName)
Write trace information as a method call in the form
objectName.methodName().
|
| void |
debugCodeCall(String methodName)
Write trace information as a method call in the form
objectName.methodName().
Parameters:
methodName - the method name
|
| void |
debugCodeCall(String methodName, long param)
Write trace information as a method call in the form
objectName.methodName(param) where the parameter is formatted as a long
value.
|
| void |
debugCodeCall(String methodName, long param)
Write trace information as a method call in the form
objectName.methodName(param) where the parameter is formatted as a long
value.
Parameters:
methodName - the method name
param - one single long parameter
|
| void |
debugCodeCall(String methodName, String param)
Write trace information as a method call in the form
objectName.methodName(param) where the parameter is formatted as a Java
string.
|
| void |
debugCodeCall(String methodName, String param)
Write trace information as a method call in the form
objectName.methodName(param) where the parameter is formatted as a Java
string.
Parameters:
methodName - the method name
param - one single string parameter
|
| boolean |
isDebugEnabled()
Check if the debug trace level is enabled.
|
| boolean |
isDebugEnabled()
Check if the debug trace level is enabled.
Returns:
true if it is
|
| boolean |
isInfoEnabled()
Check if info trace level is enabled.
|
| boolean |
isInfoEnabled()
Check if info trace level is enabled.
Returns:
true if it is
|
| SQLException |
logAndConvert(Throwable ex)
Log an exception and convert it to a SQL exception if required.
|
| SQLException |
logAndConvert(Throwable ex)
Log an exception and convert it to a SQL exception if required.
Parameters:
ex - the exception
Returns:
the SQL exception object
|
| void |
setTrace(Trace trace, int type, int id)
Set the options to use when writing trace message.
|
| void |
setTrace(Trace trace, int type, int id)
Set the options to use when writing trace message.
Parameters:
trace - the trace object
type - the trace object type
id - the trace object id
|
| SQLException |
unsupported(String message)
Get a SQL exception meaning this feature is not supported.
|
| SQLException |
unsupported(String message)
Get a SQL exception meaning this feature is not supported.
Parameters:
message - the message
Returns:
the SQL exception
|
The trace type id for callable statements.
The trace type id for connections.
The trace type id for clobs.
The trace type id for parameter meta data objects.
The trace type id for data sources.
The trace type id for XA data sources.
The trace type id for transaction ids.
The trace type id for array objects.
The trace type id for database meta data objects.
The trace type id for prepared statements.
The trace type id for result sets.
The trace type id for result set meta data objects.
The trace type id for savepoint objects.
The trace type id for statements.
The trace type id for blobs.
The trace module used by this object.