public class ResultSetHelperService extends Object implements ResultSetHelper
| Modifier and Type | Field and Description |
|---|---|
protected static int |
CLOBBUFFERSIZE |
| Constructor and Description |
|---|
ResultSetHelperService()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
getColumnNames(ResultSet rs)
Returns the column names from the ResultSet.
|
String[] |
getColumnValues(ResultSet rs)
Returns the column values from the result set.
|
String[] |
getColumnValues(ResultSet rs,
boolean trim)
Returns the column values from the result set with the values trimmed if desired.
|
String[] |
getColumnValues(ResultSet rs,
boolean trim,
String dateFormatString,
String timeFormatString)
Returns the column values from the result set with the values trimmed if desired.
|
protected String |
handleTimestamp(Timestamp timestamp,
String timestampFormatString)
The formatted timestamp.
|
void |
setDateFormat(String dateFormat)
Set a default date format pattern that will be used by the service.
|
void |
setDateTimeFormat(String dateTimeFormat)
Set a default date time format pattern that will be used by the service.
|
protected static final int CLOBBUFFERSIZE
public void setDateFormat(String dateFormat)
dateFormat - Desired date formatpublic void setDateTimeFormat(String dateTimeFormat)
dateTimeFormat - Desired date time formatpublic String[] getColumnNames(ResultSet rs) throws SQLException
ResultSetHelpergetColumnNames in interface ResultSetHelperrs - ResultSetSQLException - Thrown by the ResultSet.public String[] getColumnValues(ResultSet rs) throws SQLException, IOException
ResultSetHelpergetColumnValues in interface ResultSetHelperrs - The ResultSet containing the values.SQLException - Thrown by the ResultSet.IOException - Thrown by the ResultSet.public String[] getColumnValues(ResultSet rs, boolean trim) throws SQLException, IOException
ResultSetHelpergetColumnValues in interface ResultSetHelperrs - The ResultSet containing the values.trim - Values should have white spaces trimmed.SQLException - Thrown by the ResultSet.IOException - Thrown by the ResultSet.public String[] getColumnValues(ResultSet rs, boolean trim, String dateFormatString, String timeFormatString) throws SQLException, IOException
ResultSetHelpergetColumnValues in interface ResultSetHelperrs - The ResultSet containing the values.trim - Values should have white spaces trimmed.dateFormatString - Format string for dates.timeFormatString - Format string for timestamps.SQLException - Thrown by the ResultSet.IOException - Thrown by the ResultSet.Copyright © 2019. All rights reserved.