Class TimestampAdapter

  • All Implemented Interfaces:
    Adapter<java.util.Date,​java.lang.Long>, MapperConverter

    public class TimestampAdapter
    extends java.lang.Object
    implements Adapter<java.util.Date,​java.lang.Long>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Long from​(java.util.Date date)
      Take the POJO_TYPE object A from a POJO an convert it to JSON_TYPE which will be inserted into the JSON output.
      java.util.Date to​(java.lang.Long aLong)
      Transfer JSONTYPE_TYPE from JSON to POJO as POJO_TYPE.
      • Methods inherited from class java.lang.Object

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

      • TimestampAdapter

        public TimestampAdapter()
    • Method Detail

      • to

        public java.util.Date to​(java.lang.Long aLong)
        Description copied from interface: Adapter
        Transfer JSONTYPE_TYPE from JSON to POJO as POJO_TYPE.
        Specified by:
        to in interface Adapter<java.util.Date,​java.lang.Long>
        Parameters:
        aLong - the JSON type
        Returns:
        the equivalent Java type
      • from

        public java.lang.Long from​(java.util.Date date)
        Description copied from interface: Adapter
        Take the POJO_TYPE object A from a POJO an convert it to JSON_TYPE which will be inserted into the JSON output.
        Specified by:
        from in interface Adapter<java.util.Date,​java.lang.Long>
        Parameters:
        date - the Java type
        Returns:
        the equivalent JSON type