org.araneaframework.backend.list.helper.reader
Class DefaultResultSetColumnReader
java.lang.Object
org.araneaframework.backend.list.helper.reader.DefaultResultSetColumnReader
- All Implemented Interfaces:
- ResultSetColumnReader
- public class DefaultResultSetColumnReader
- extends Object
- implements ResultSetColumnReader
Default implementation of ResultSetColumnReader.
For each Java type the respectful "get" method is used of the ResultSet.
For Date an instance of that class is returned (not a Date).
If unsupported Java type is used a runtime exception is thrown.
- Author:
- Jevgeni Kabanov (ekabanov at araneaframework dot org)
- See Also:
ResultSetColumnReader
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instance
protected static final ResultSetColumnReader instance
DefaultResultSetColumnReader
protected DefaultResultSetColumnReader()
getInstance
public static ResultSetColumnReader getInstance()
- Returns a Singleton instance of the
DefaultResultSetReader.
readFromResultSet
public Object readFromResultSet(String columnName,
ResultSet resultSet,
Class javaType)
- Tries to read the same type as is given in the
javaType.
- Specified by:
readFromResultSet in interface ResultSetColumnReader
- Parameters:
columnName - column in ResultSet.resultSet - JDBC result set.javaType - java type to read to.
- Returns:
- Custom Java Object from the given
ResultSet column.