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 booleantimeZoneIgnored
-
Constructor Summary
Constructors Constructor Description DateMapper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.DatefromISO8601(java.lang.String timestampString)static java.util.DatefromISO8601(java.lang.String timestampString, boolean timezoneIgnored)java.lang.ClassgetHelpedClass()static booleanisTimeZoneIgnored()static voidsetTimeZoneIgnored(boolean timeZoneIgnored)java.lang.ObjecttoJava(JSONValue aValue, java.lang.Class aRequestedClass)JSONValuetoJSON(java.lang.Object aPojo)static java.lang.StringtoRFC3339(java.util.Date date)static java.lang.StringtoRFC3339(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:
toJSONin interfaceSimpleMapperHelper- Overrides:
toJSONin 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
-
-