Class Extractors.PrimitiveExtractor

java.lang.Object
org.proto4j.redis.Extractors.PrimitiveExtractor
All Implemented Interfaces:
RedisExtractor<java.lang.Object>, SQLExtractor<java.lang.Object>
Enclosing class:
Extractors

public static class Extractors.PrimitiveExtractor
extends java.lang.Object
implements RedisExtractor<java.lang.Object>
  • Constructor Summary

    Constructors 
    Constructor Description
    PrimitiveExtractor()  
  • Method Summary

    Modifier and Type Method Description
    boolean accept​(java.lang.Class<?> cls)
    Retrieves whether this extractor can handle the given type.
    static boolean isPrimitive​(java.lang.Class<?> cls)  
    <E> RedisExtractor<E> newInstance​(java.lang.Class<E> cls)
    Creates a new extractor based on the given type.
    java.lang.Object read​(java.sql.ResultSet resultSet, SQLContext context)
    Applies this extractor to the given ResultSet and SQLContext.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • isPrimitive

      public static boolean isPrimitive​(java.lang.Class<?> cls)
    • read

      public java.lang.Object read​(java.sql.ResultSet resultSet, SQLContext context) throws java.sql.SQLException
      Description copied from interface: SQLExtractor
      Applies this extractor to the given ResultSet and SQLContext.
      Specified by:
      read in interface SQLExtractor<java.lang.Object>
      Parameters:
      resultSet - the provided query result
      context - an object covering context variables
      Returns:
      an instance of the result type
      Throws:
      java.sql.SQLException - if an I/O error occurs
    • 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 interface RedisExtractor<java.lang.Object>
      Parameters:
      cls - a class instance specifying the type that should be extracted.
      Returns:
      true if accepted, otherwise false
    • newInstance

      public <E> RedisExtractor<E> newInstance​(java.lang.Class<E> cls)
      Description copied from interface: RedisExtractor
      Creates a new extractor based on the given type.
      Specified by:
      newInstance in interface RedisExtractor<java.lang.Object>
      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