net.sourceforge.sqlunit.types
Class TextType
java.lang.Object
net.sourceforge.sqlunit.types.UnsupportedType
net.sourceforge.sqlunit.types.TextType
- All Implemented Interfaces:
- java.lang.Comparable, IType
public class TextType
- extends UnsupportedType
Models long character text (TEXT). The difference between this type
and the standard StringType is that this is not sortable, and cannot
be used for input. It can be output from stored procedures, and the
results are digested into an MD5, which is compared to another specified
MD5 String, or a file, whose contents are digested using MD5 and the
resulting MD5 digests compared for equality. Internally, it is created
from an ASCII InputStream returned in the ResultSet. Results for this
type can be provided as an MD5 Digest (prefixed by md5:) or a file name
(prefixed by file:).
- Version:
- $Revision: 1.11 $
- Author:
- Ralph Brendler (rbrendler@users.sourceforge.net), Sujit Pal (spal@users.sourceforge.net)
Method Summary |
protected java.lang.String |
format(java.lang.Object obj)
Format the Text to an MD5 Digest String. |
protected java.lang.String |
formatString(java.lang.String obj)
Defines behavior that is activated when the passed in Object is
a String. |
Methods inherited from class net.sourceforge.sqlunit.types.UnsupportedType |
compareTo, equals, getId, getName, getValue, hashCode, parse, setId, setName, setValue, toObject, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
TextType
public TextType()
formatString
protected java.lang.String formatString(java.lang.String obj)
throws SQLUnitException
- Defines behavior that is activated when the passed in Object is
a String.
- Overrides:
formatString
in class UnsupportedType
- Parameters:
obj
- the String to convert.
- Returns:
- a converted String.
- Throws:
SQLUnitException
- if there was a problem.
format
protected java.lang.String format(java.lang.Object obj)
throws SQLUnitException
- Format the Text to an MD5 Digest String.
- Overrides:
format
in class UnsupportedType
- Parameters:
obj
- an Object to be converted to the IType interface.
- Returns:
- the String representation of the object.
- Throws:
SQLUnitException
- if the formatting failed.