Class EpochTimestamp.Deserializer

java.lang.Object
com.fasterxml.jackson.databind.JsonDeserializer<java.sql.Timestamp>
tenapull.data.deserialize.EpochTimestamp.Deserializer
All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.NullValueProvider
Enclosing class:
EpochTimestamp

public static class EpochTimestamp.Deserializer
extends com.fasterxml.jackson.databind.JsonDeserializer<java.sql.Timestamp>
Deserializes a JSON integer representing seconds into a java.sql.Timestamp
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer

    com.fasterxml.jackson.databind.JsonDeserializer.None
  • Constructor Summary

    Constructors 
    Constructor Description
    Deserializer()  
  • Method Summary

    Modifier and Type Method Description
    java.sql.Timestamp deserialize​(com.fasterxml.jackson.core.JsonParser jp, com.fasterxml.jackson.databind.DeserializationContext ctxt)
    Obtains the timestamp as text and passes to the static deserialize method, which does the work of converting to java.sql.Timestamp
    static java.sql.Timestamp deserialize​(java.lang.String timestamp)
    Static utility which is invoked by the instance deserialize method, and can also be invoked by other classes.

    Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer

    deserialize, deserializeWithType, deserializeWithType, findBackReference, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, handledType, isCachable, replaceDelegatee, supportsUpdate, unwrappingDeserializer

    Methods inherited from class java.lang.Object

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

  • Method Details

    • deserialize

      public java.sql.Timestamp deserialize​(com.fasterxml.jackson.core.JsonParser jp, com.fasterxml.jackson.databind.DeserializationContext ctxt) throws java.io.IOException, com.fasterxml.jackson.core.JsonProcessingException
      Obtains the timestamp as text and passes to the static deserialize method, which does the work of converting to java.sql.Timestamp
      Specified by:
      deserialize in class com.fasterxml.jackson.databind.JsonDeserializer<java.sql.Timestamp>
      Parameters:
      jp -
      ctxt -
      Returns:
      The converted timestamp
      Throws:
      java.io.IOException
      com.fasterxml.jackson.core.JsonProcessingException
    • deserialize

      public static java.sql.Timestamp deserialize​(java.lang.String timestamp)
      Static utility which is invoked by the instance deserialize method, and can also be invoked by other classes. Takes an epoch timestamp string in seconds, adds three zeros to convert to milliseconds, parses as an int, and then converts to a java.sql.Timestamp
      Parameters:
      timestamp - string in seconds
      Returns:
      the converted timestamp