Package org.r10r.sqlify.resultparser
Class SingleOptionalResultParser<T>
- java.lang.Object
-
- org.r10r.sqlify.resultparser.SingleOptionalResultParser<T>
-
- All Implemented Interfaces:
ResultParser<Optional<T>>
public class SingleOptionalResultParser<T> extends Object implements ResultParser<Optional<T>>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <E> SingleOptionalResultParser<E>of(Class<E> clazz)static <E> SingleOptionalResultParser<E>of(RowParser<E> rowParser)Define your own RowParser.Optional<T>parseResultSet(ResultSet resultSet)
-
-
-
Method Detail
-
of
public static <E> SingleOptionalResultParser<E> of(RowParser<E> rowParser)
Define your own RowParser. Full flexibility.- Type Parameters:
E- The type the RowParser will return- Parameters:
rowParser- The RowParser to use- Returns:
- The ListResultParser that will use the defined RowParser to parse rows.
-
of
public static <E> SingleOptionalResultParser<E> of(Class<E> clazz)
-
parseResultSet
public Optional<T> parseResultSet(ResultSet resultSet) throws Exception
- Specified by:
parseResultSetin interfaceResultParser<T>- Throws:
Exception
-
-