Class DateMapper
- java.lang.Object
-
- com.sdicons.json.mapper.helper.impl.AbstractMapper
-
- com.sdicons.json.mapper.helper.impl.DateMapper
-
- All Implemented Interfaces:
Helper
,SimpleMapperHelper
public class DateMapper extends AbstractMapper
-
-
Field Summary
Fields Modifier and Type Field Description private static boolean
timeZoneIgnored
-
Constructor Summary
Constructors Constructor Description DateMapper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.Date
fromISO8601(java.lang.String timestampString)
static java.util.Date
fromISO8601(java.lang.String timestampString, boolean timezoneIgnored)
java.lang.Class
getHelpedClass()
static boolean
isTimeZoneIgnored()
static void
setTimeZoneIgnored(boolean timeZoneIgnored)
java.lang.Object
toJava(JSONValue aValue, java.lang.Class aRequestedClass)
JSONValue
toJSON(java.lang.Object aPojo)
static java.lang.String
toRFC3339(java.util.Date date)
static java.lang.String
toRFC3339(java.util.Date date, boolean timezoneIgnored)
-
-
-
Method Detail
-
isTimeZoneIgnored
public static boolean isTimeZoneIgnored()
-
setTimeZoneIgnored
public static void setTimeZoneIgnored(boolean timeZoneIgnored)
-
getHelpedClass
public java.lang.Class getHelpedClass()
-
toJSON
public JSONValue toJSON(java.lang.Object aPojo) throws MapperException
- Specified by:
toJSON
in interfaceSimpleMapperHelper
- Overrides:
toJSON
in classAbstractMapper
- Throws:
MapperException
-
toJava
public java.lang.Object toJava(JSONValue aValue, java.lang.Class aRequestedClass) throws MapperException
- Throws:
MapperException
-
toRFC3339
public static java.lang.String toRFC3339(java.util.Date date)
-
toRFC3339
public static java.lang.String toRFC3339(java.util.Date date, boolean timezoneIgnored)
-
fromISO8601
public static java.util.Date fromISO8601(java.lang.String timestampString) throws MapperException
- Throws:
MapperException
-
fromISO8601
public static java.util.Date fromISO8601(java.lang.String timestampString, boolean timezoneIgnored) throws MapperException
- Throws:
MapperException
-
-