|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--voji.utils.DataFormat
This class defines an way to format the result of an SQL query to a string. This is especially useful for printing.
Constructor Summary | |
DataFormat()
Creates a new DataFormat instance |
|
DataFormat(java.text.Format format)
Creates a new DataFormat instance. |
Method Summary | |
java.lang.String |
format(java.util.Iterator objects)
Formats an Iterator. |
java.lang.String |
format(java.util.Iterator objects,
int index)
Formats an Iterator. |
static java.util.Vector |
format(java.util.Iterator objects,
java.util.List formats)
Formats an Iterator using more formats. |
java.lang.String |
format(java.util.List objects,
int index)
Formats a List |
static java.util.Vector |
format(java.util.List objects,
java.util.List formats)
Formats a List using more formats. |
java.lang.String |
format(java.lang.Object[] objects,
int index)
Formats an Array |
static java.util.Vector |
format(java.lang.Object[] objects,
java.util.List formats)
Formats an Array using more formats. |
java.lang.String |
format(java.sql.ResultSet resultSet,
int index)
Formats a ResultSet |
static java.util.Vector |
format(java.sql.ResultSet resultSet,
java.util.List formats)
Formats a ResultSet using more formats. |
static java.util.Vector |
formatAll(java.util.List objects,
java.util.List formats)
Formats a List of List using more formats. |
static java.util.Vector |
formatAll(java.sql.ResultSet resultSet,
java.util.List formats)
Formats a ResultSet using more formats. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DataFormat(java.text.Format format)
format
- the Format to usepublic DataFormat()
Method Detail |
public java.lang.String format(java.sql.ResultSet resultSet, int index) throws java.sql.SQLException
resultSet
- the ResultSet that needs to be formattedindex
- the column index (starting with 1) where to start from
resultSet
java.sql.SQLException
public java.lang.String format(java.lang.Object[] objects, int index)
objects
- the Array of Objects that needs to be formattedindex
- the index where to start from
objects
public java.lang.String format(java.util.List objects, int index)
objects
- the List of Objects that needs to be formattedindex
- the index where to start from
objects
public java.lang.String format(java.util.Iterator objects, int index)
objects
- the Iterator of Objects that needs to be formattedindex
- the index where to start from
objects
public java.lang.String format(java.util.Iterator objects)
objects
- the Iterator of Objects that needs to be formatted
objects
public static java.util.Vector format(java.sql.ResultSet resultSet, java.util.List formats) throws java.sql.SQLException
resultSet
- the ResultSet that needs to be formattedformats
- a List of DataFormats containing the formats to use
objects
java.sql.SQLException
public static java.util.Vector format(java.lang.Object[] objects, java.util.List formats)
objects
- the Array of Objects that needs to be formattedformats
- a List of DataFormats containing the formats to use
objects
public static java.util.Vector format(java.util.List objects, java.util.List formats)
objects
- the List of Objects that needs to be formattedformats
- a List of DataFormats containing the formats to use
objects
public static java.util.Vector format(java.util.Iterator objects, java.util.List formats)
DataFormat(null)
means
"convert to string",
the format null
means
"don't convert".
objects
- the Iterator of Objects that needs to be formattedformats
- a List of DataFormats containing the formats to use
objects
and some Objects unaltered
(where the format was null
).public static java.util.Vector formatAll(java.sql.ResultSet resultSet, java.util.List formats) throws java.sql.SQLException
formats
- a List of DataFormats containing the formats to use
objects
java.sql.SQLException
public static java.util.Vector formatAll(java.util.List objects, java.util.List formats)
objects
- the List of Objects that needs to be formattedformats
- a List of DataFormats containing the formats to use
objects
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |