Class SQLDataProvider
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,Object>
XDocReport support for SQL
ResultSet. The implementation of this class
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionSQLDataProvider(ResultSet rs, fr.opensagres.xdocreport.template.formatter.FieldsMetadata metadata) SQL Data provider constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected intReturns the column count.protected StringgetColumnLabel(ResultSet rs, int column) Returns the column label name of the given column of the given ResultSet.protected abstract StringgetListName(String tableName, String columnName) Returns true if the given column of the given table is a field list and false otherwise.protected StringgetTableName(ResultSet rs, int column) Returns the table name of the given column of the given ResultSet.Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
SQLDataProvider
public SQLDataProvider(ResultSet rs, fr.opensagres.xdocreport.template.formatter.FieldsMetadata metadata) throws SQLException SQL Data provider constructor.- Parameters:
rs- the SQLResultSetmetadata- theFieldsMetadata.- Throws:
SQLException
-
-
Method Details
-
getColumnCount
Returns the column count. Override this method if your JDBC driver cannot support that.- Parameters:
rs-- Returns:
- Throws:
SQLException
-
getTableName
Returns the table name of the given column of the given ResultSet. Override this method if your JDBC driver cannot support that.- Parameters:
rs-column-- Returns:
- Throws:
SQLException
-
getColumnLabel
Returns the column label name of the given column of the given ResultSet. Override this method if your JDBC driver cannot support that.- Parameters:
rs-column-- Returns:
- Throws:
SQLException
-
getListName
Returns true if the given column of the given table is a field list and false otherwise.- Parameters:
tableName-columnName-- Returns:
-