java.lang.Object
org.proto4j.redis.Extractors.RawExtractor
- All Implemented Interfaces:
RedisExtractor<java.sql.ResultSet>
,SQLExtractor<java.sql.ResultSet>
- Enclosing class:
- Extractors
public static class Extractors.RawExtractor extends java.lang.Object implements RedisExtractor<java.sql.ResultSet>
-
Constructor Summary
Constructors Constructor Description RawExtractor()
-
Method Summary
Modifier and Type Method Description boolean
accept(java.lang.Class<?> cls)
Retrieves whether this extractor can handle the given type.<E> RedisExtractor<E>
newInstance(java.lang.Class<E> cls)
Creates a new extractor based on the given type.java.sql.ResultSet
read(java.sql.ResultSet resultSet, SQLContext context)
Applies this extractor to the givenResultSet
andSQLContext
.
-
Constructor Details
-
RawExtractor
public RawExtractor()
-
-
Method Details
-
accept
public boolean accept(java.lang.Class<?> cls)Description copied from interface:RedisExtractor
Retrieves whether this extractor can handle the given type.- Specified by:
accept
in interfaceRedisExtractor<java.sql.ResultSet>
- Parameters:
cls
- a class instance specifying the type that should be extracted.- Returns:
true
if accepted, otherwisefalse
-
newInstance
Description copied from interface:RedisExtractor
Creates a new extractor based on the given type.- Specified by:
newInstance
in interfaceRedisExtractor<java.sql.ResultSet>
- Type Parameters:
E
- the next return type- Parameters:
cls
- a class instance specifying the type that should be extracted.- Returns:
- a new RedisExtractor instance for the given type
-
read
public java.sql.ResultSet read(java.sql.ResultSet resultSet, SQLContext context) throws java.sql.SQLExceptionDescription copied from interface:SQLExtractor
Applies this extractor to the givenResultSet
andSQLContext
.- Specified by:
read
in interfaceSQLExtractor<java.sql.ResultSet>
- Parameters:
resultSet
- the provided query resultcontext
- an object covering context variables- Returns:
- an instance of the result type
- Throws:
java.sql.SQLException
- if an I/O error occurs
-