public class ResultSetColumnNameHelperService extends ResultSetHelperService implements ResultSetHelper
CLOBBUFFERSIZE, dateFormat, dateTimeFormat, floatingPointFormat, integerFormat, nullDefault| Constructor and Description |
|---|
ResultSetColumnNameHelperService()
Nullary constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
getColumnNames(ResultSet rs)
Returns the column names from the result set.
|
String[] |
getColumnValues(ResultSet rs)
Get all the column values from the result set.
|
String[] |
getColumnValues(ResultSet rs,
boolean trim)
Get all the column values from the result set.
|
String[] |
getColumnValues(ResultSet rs,
boolean trim,
String dateFormatString,
String timeFormatString)
Get all the column values from the result set.
|
void |
setColumnNames(String[] columnNames,
String[] columnHeaders)
Set the JDBC column names to use, and the header text for the CSV file
|
void |
setErrorLocale(Locale errorLocale)
Sets the locale for error messages.
|
handleClob, handleDate, handleNClob, handleNVarChar, handleTimestamp, handleVarChar, setDateFormat, setDateTimeFormat, setFloatingPointFormat, setIntegerFormat, setNullDefaultpublic ResultSetColumnNameHelperService()
public void setErrorLocale(Locale errorLocale)
errorLocale - Locale for error messages. If null, the default locale
is used.public void setColumnNames(String[] columnNames, String[] columnHeaders)
columnNames - The JDBC column names to export, in the desired ordercolumnHeaders - The column headers of the CSV file, in the desired orderUnsupportedOperationException - If the number of headers is different
than the number of columns, or if any of the columns or headers is blank
or null.public String[] getColumnNames(ResultSet rs) throws SQLException
getColumnNames in interface ResultSetHelpergetColumnNames in class ResultSetHelperServicers - ResultSetSQLException - Thrown by the result set.public String[] getColumnValues(ResultSet rs) throws SQLException, IOException
getColumnValues in interface ResultSetHelpergetColumnValues in class ResultSetHelperServicers - The ResultSet containing the values.SQLException - Thrown by the result set.IOException - Thrown by the result set.public String[] getColumnValues(ResultSet rs, boolean trim) throws SQLException, IOException
getColumnValues in interface ResultSetHelpergetColumnValues in class ResultSetHelperServicers - The ResultSet containing the values.trim - Values should have white spaces trimmed.SQLException - Thrown by the result set.IOException - Thrown by the result set.public String[] getColumnValues(ResultSet rs, boolean trim, String dateFormatString, String timeFormatString) throws SQLException, IOException
getColumnValues in interface ResultSetHelpergetColumnValues in class ResultSetHelperServicers - 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 result set.IOException - Thrown by the result set.Copyright © 2005–2025. All rights reserved.