Class AbstractDeserializer<T>

  • All Implemented Interfaces:
    com.fasterxml.jackson.databind.deser.NullValueProvider, com.fasterxml.jackson.databind.deser.ValueInstantiator.Gettable, java.io.Serializable

    public abstract class AbstractDeserializer<T>
    extends com.fasterxml.jackson.databind.deser.std.StdDeserializer<T>
    Class implements a base class that can be used to implement JSON deserializers.
    Author:
    JEAF Development Team
    See Also:
    Serialized Form
    • Nested Class Summary

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

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

      • Fields inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

        _valueClass, _valueType, F_MASK_ACCEPT_ARRAYS, F_MASK_INT_COERCIONS
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractDeserializer​(java.lang.Class<?> pType)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      T deserialize​(com.fasterxml.jackson.core.JsonParser pParser, com.fasterxml.jackson.databind.DeserializationContext pContext)
      Method reads version info data from the JSON data and creates a VersionInfo object out of it.
      abstract T deserialize​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode)
      Method deserializes the passed JSON ObjectNode into its matching "real" object.
      protected java.math.BigDecimal getBigDecimalValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode, java.lang.String pFieldName, java.math.BigDecimal pDefaultValue)
      Method returns the BigDecimal value from the field with the passed name from the passed JSON node.
      protected java.math.BigInteger getBigIntegerValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode, java.lang.String pFieldName, java.math.BigInteger pDefaultValue)
      Method returns the BigInteger value from the field with the passed name from the passed JSON node.
      protected boolean getBooleanValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode, java.lang.String pFieldName, boolean pDefaultValue)
      Method returns the boolean value from the field with the passed name from the passed JSON node.
      protected java.lang.Boolean getBooleanValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode, java.lang.String pFieldName, java.lang.Boolean pDefaultValue)
      Method returns the Boolean value from the field with the passed name from the passed JSON node.
      protected byte getByteValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode, java.lang.String pFieldName, byte pDefaultValue)
      Method returns the byte value from the field with the passed name from the passed JSON node.
      protected java.lang.Byte getByteValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode, java.lang.String pFieldName, java.lang.Byte pDefaultValue)
      Method returns the Byte value from the field with the passed name from the passed JSON node.
      protected java.util.Calendar getCalendarValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode, java.lang.String pFieldName, java.util.Calendar pDefaultValue)
      Method returns the Calendar value from the field with the passed name from the passed JSON node.
      protected java.util.Date getDateValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode, java.lang.String pFieldName, java.util.Date pDefaultValue)
      Method returns the Date value from the field with the passed name from the passed JSON node.
      protected double getDoubleValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode, java.lang.String pFieldName, double pDefaultValue)
      Method returns the double value from the field with the passed name from the passed JSON node.
      protected java.lang.Double getDoubleValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode, java.lang.String pFieldName, java.lang.Double pDefaultValue)
      Method returns the Double value from the field with the passed name from the passed JSON node.
      protected float getFloatValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode, java.lang.String pFieldName, float pDefaultValue)
      Method returns the float value from the field with the passed name from the passed JSON node.
      protected java.lang.Float getFloatValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode, java.lang.String pFieldName, java.lang.Float pDefaultValue)
      Method returns the Float value from the field with the passed name from the passed JSON node.
      protected int getIntegerValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode, java.lang.String pFieldName, int pDefaultValue)
      Method returns the int value from the field with the passed name from the passed JSON node.
      protected java.lang.Integer getIntegerValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode, java.lang.String pFieldName, java.lang.Integer pDefaultValue)
      Method returns the Integer value from the field with the passed name from the passed JSON node.
      protected long getLongValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode, java.lang.String pFieldName, long pDefaultValue)
      Method returns the long value from the field with the passed name from the passed JSON node.
      protected java.lang.Long getLongValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode, java.lang.String pFieldName, java.lang.Long pDefaultValue)
      Method returns the Long value from the field with the passed name from the passed JSON node.
      protected short getShortValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode, java.lang.String pFieldName, short pDefaultValue)
      Method returns the short value from the field with the passed name from the passed JSON node.
      protected java.lang.Short getShortValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode, java.lang.String pFieldName, java.lang.Short pDefaultValue)
      Method returns the Short value from the field with the passed name from the passed JSON node.
      protected java.lang.String getStringValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode, java.lang.String pFieldName, java.lang.String pDefaultValue)
      Method returns the String value from the field with the passed name from the passed JSON node.
      • Methods inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

        _byteOverflow, _checkCoercionFail, _checkDoubleSpecialValue, _checkFloatSpecialValue, _checkFloatToIntCoercion, _checkFromStringCoercion, _checkFromStringCoercion, _checkTextualNull, _coerceBooleanFromInt, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeFromEmptyString, _deserializeFromString, _deserializeWrappedValue, _failDoubleToIntCoercion, _findCoercionFromBlankString, _findCoercionFromEmptyArray, _findCoercionFromEmptyString, _findNullProvider, _hasTextualNull, _intOverflow, _isBlank, _isEmptyOrTextualNull, _isFalse, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _isTrue, _neitherNull, _nonNullNumber, _parseBoolean, _parseBooleanFromInt, _parseBooleanPrimitive, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDouble, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseInteger, _parseInteger, _parseIntPrimitive, _parseIntPrimitive, _parseLong, _parseLong, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _reportFailedNullCoerce, _shortOverflow, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _verifyNullForScalarCoercion, _verifyNumberForScalarCoercion, _verifyStringForScalarCoercion, deserializeWithType, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueClass, getValueInstantiator, getValueType, getValueType, handledType, handleMissingEndArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer
      • Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer

        deserialize, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, isCachable, logicalType, replaceDelegatee, supportsUpdate, unwrappingDeserializer
      • Methods inherited from class java.lang.Object

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

      • AbstractDeserializer

        protected AbstractDeserializer​(java.lang.Class<?> pType)
    • Method Detail

      • deserialize

        public final T deserialize​(com.fasterxml.jackson.core.JsonParser pParser,
                                   com.fasterxml.jackson.databind.DeserializationContext pContext)
                            throws com.fasterxml.jackson.core.JacksonException,
                                   java.io.IOException
        Method reads version info data from the JSON data and creates a VersionInfo object out of it.
        Specified by:
        deserialize in class com.fasterxml.jackson.databind.JsonDeserializer<T>
        Parameters:
        pParser - JSON parser. The parameter must not be null.
        pContext - Context information. The parameter is not used by this implementation.
        Throws:
        com.fasterxml.jackson.core.JacksonException
        java.io.IOException
      • deserialize

        public abstract T deserialize​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode)
        Method deserializes the passed JSON ObjectNode into its matching "real" object.
        Parameters:
        pObjectNode - JSON data that should be converted into an real object. The parameter must not be null.
        Returns:
        T Real object that was created using JSON data. The method may return null.
      • getStringValueFromNode

        protected final java.lang.String getStringValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode,
                                                                java.lang.String pFieldName,
                                                                java.lang.String pDefaultValue)
        Method returns the String value from the field with the passed name from the passed JSON node.
        Parameters:
        pObjectNode - Node from which the field should be read. The parameter must not be null.
        pFieldName - Name of the field from which the value should be read. The parameter must not be null.
        pDefaultValue - Default value that should be used in case that the field is not present or null. The parameter may be null.
        Returns:
        String Value of the passed field or its default value.
      • getDateValueFromNode

        protected final java.util.Date getDateValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode,
                                                            java.lang.String pFieldName,
                                                            java.util.Date pDefaultValue)
        Method returns the Date value from the field with the passed name from the passed JSON node.
        Parameters:
        pObjectNode - Node from which the field should be read. The parameter must not be null.
        pFieldName - Name of the field from which the value should be read. The parameter must not be null.
        pDefaultValue - Default value that should be used in case that the field is not present or null. The parameter may be null.
        Returns:
        Date Value of the passed field or its default value.
      • getCalendarValueFromNode

        protected final java.util.Calendar getCalendarValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode,
                                                                    java.lang.String pFieldName,
                                                                    java.util.Calendar pDefaultValue)
        Method returns the Calendar value from the field with the passed name from the passed JSON node.
        Parameters:
        pObjectNode - Node from which the field should be read. The parameter must not be null.
        pFieldName - Name of the field from which the value should be read. The parameter must not be null.
        pDefaultValue - Default value that should be used in case that the field is not present or null. The parameter may be null.
        Returns:
        Calendar Value of the passed field or its default value.
      • getBooleanValueFromNode

        protected final boolean getBooleanValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode,
                                                        java.lang.String pFieldName,
                                                        boolean pDefaultValue)
        Method returns the boolean value from the field with the passed name from the passed JSON node.
        Parameters:
        pObjectNode - Node from which the field should be read. The parameter must not be null.
        pFieldName - Name of the field from which the value should be read. The parameter must not be null.
        pDefaultValue - Default value that should be used in case that the field is not present or null.
        Returns:
        boolean Value of the passed field or its default value.
      • getBooleanValueFromNode

        protected final java.lang.Boolean getBooleanValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode,
                                                                  java.lang.String pFieldName,
                                                                  java.lang.Boolean pDefaultValue)
        Method returns the Boolean value from the field with the passed name from the passed JSON node.
        Parameters:
        pObjectNode - Node from which the field should be read. The parameter must not be null.
        pFieldName - Name of the field from which the value should be read. The parameter must not be null.
        pDefaultValue - Default value that should be used in case that the field is not present or null. The parameter may be null.
        Returns:
        Boolean Value of the passed field or its default value.
      • getByteValueFromNode

        protected final byte getByteValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode,
                                                  java.lang.String pFieldName,
                                                  byte pDefaultValue)
        Method returns the byte value from the field with the passed name from the passed JSON node.
        Parameters:
        pObjectNode - Node from which the field should be read. The parameter must not be null.
        pFieldName - Name of the field from which the value should be read. The parameter must not be null.
        pDefaultValue - Default value that should be used in case that the field is not present or null.
        Returns:
        byte Value of the passed field or its default value.
      • getByteValueFromNode

        protected final java.lang.Byte getByteValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode,
                                                            java.lang.String pFieldName,
                                                            java.lang.Byte pDefaultValue)
        Method returns the Byte value from the field with the passed name from the passed JSON node.
        Parameters:
        pObjectNode - Node from which the field should be read. The parameter must not be null.
        pFieldName - Name of the field from which the value should be read. The parameter must not be null.
        pDefaultValue - Default value that should be used in case that the field is not present or null. The parameter may be null.
        Returns:
        Byte Value of the passed field or its default value.
      • getShortValueFromNode

        protected final short getShortValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode,
                                                    java.lang.String pFieldName,
                                                    short pDefaultValue)
        Method returns the short value from the field with the passed name from the passed JSON node.
        Parameters:
        pObjectNode - Node from which the field should be read. The parameter must not be null.
        pFieldName - Name of the field from which the value should be read. The parameter must not be null.
        pDefaultValue - Default value that should be used in case that the field is not present or null.
        Returns:
        byte Value of the passed field or its default value.
      • getShortValueFromNode

        protected final java.lang.Short getShortValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode,
                                                              java.lang.String pFieldName,
                                                              java.lang.Short pDefaultValue)
        Method returns the Short value from the field with the passed name from the passed JSON node.
        Parameters:
        pObjectNode - Node from which the field should be read. The parameter must not be null.
        pFieldName - Name of the field from which the value should be read. The parameter must not be null.
        pDefaultValue - Default value that should be used in case that the field is not present or null. The parameter may be null.
        Returns:
        Short Value of the passed field or its default value.
      • getIntegerValueFromNode

        protected final int getIntegerValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode,
                                                    java.lang.String pFieldName,
                                                    int pDefaultValue)
        Method returns the int value from the field with the passed name from the passed JSON node.
        Parameters:
        pObjectNode - Node from which the field should be read. The parameter must not be null.
        pFieldName - Name of the field from which the value should be read. The parameter must not be null.
        pDefaultValue - Default value that should be used in case that the field is not present or null.
        Returns:
        int Value of the passed field or its default value.
      • getIntegerValueFromNode

        protected final java.lang.Integer getIntegerValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode,
                                                                  java.lang.String pFieldName,
                                                                  java.lang.Integer pDefaultValue)
        Method returns the Integer value from the field with the passed name from the passed JSON node.
        Parameters:
        pObjectNode - Node from which the field should be read. The parameter must not be null.
        pFieldName - Name of the field from which the value should be read. The parameter must not be null.
        pDefaultValue - Default value that should be used in case that the field is not present or null. The parameter may be null.
        Returns:
        Integer Value of the passed field or its default value.
      • getLongValueFromNode

        protected final long getLongValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode,
                                                  java.lang.String pFieldName,
                                                  long pDefaultValue)
        Method returns the long value from the field with the passed name from the passed JSON node.
        Parameters:
        pObjectNode - Node from which the field should be read. The parameter must not be null.
        pFieldName - Name of the field from which the value should be read. The parameter must not be null.
        pDefaultValue - Default value that should be used in case that the field is not present or null.
        Returns:
        long Value of the passed field or its default value.
      • getLongValueFromNode

        protected final java.lang.Long getLongValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode,
                                                            java.lang.String pFieldName,
                                                            java.lang.Long pDefaultValue)
        Method returns the Long value from the field with the passed name from the passed JSON node.
        Parameters:
        pObjectNode - Node from which the field should be read. The parameter must not be null.
        pFieldName - Name of the field from which the value should be read. The parameter must not be null.
        pDefaultValue - Default value that should be used in case that the field is not present or null. The parameter may be null.
        Returns:
        Long Value of the passed field or its default value.
      • getBigIntegerValueFromNode

        protected final java.math.BigInteger getBigIntegerValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode,
                                                                        java.lang.String pFieldName,
                                                                        java.math.BigInteger pDefaultValue)
        Method returns the BigInteger value from the field with the passed name from the passed JSON node.
        Parameters:
        pObjectNode - Node from which the field should be read. The parameter must not be null.
        pFieldName - Name of the field from which the value should be read. The parameter must not be null.
        pDefaultValue - Default value that should be used in case that the field is not present or null. The parameter may be null.
        Returns:
        BigInteger Value of the passed field or its default value.
      • getFloatValueFromNode

        protected final float getFloatValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode,
                                                    java.lang.String pFieldName,
                                                    float pDefaultValue)
        Method returns the float value from the field with the passed name from the passed JSON node.
        Parameters:
        pObjectNode - Node from which the field should be read. The parameter must not be null.
        pFieldName - Name of the field from which the value should be read. The parameter must not be null.
        pDefaultValue - Default value that should be used in case that the field is not present or null.
        Returns:
        long float of the passed field or its default value.
      • getFloatValueFromNode

        protected final java.lang.Float getFloatValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode,
                                                              java.lang.String pFieldName,
                                                              java.lang.Float pDefaultValue)
        Method returns the Float value from the field with the passed name from the passed JSON node.
        Parameters:
        pObjectNode - Node from which the field should be read. The parameter must not be null.
        pFieldName - Name of the field from which the value should be read. The parameter must not be null.
        pDefaultValue - Default value that should be used in case that the field is not present or null. The parameter may be null.
        Returns:
        Float Value of the passed field or its default value.
      • getDoubleValueFromNode

        protected final double getDoubleValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode,
                                                      java.lang.String pFieldName,
                                                      double pDefaultValue)
        Method returns the double value from the field with the passed name from the passed JSON node.
        Parameters:
        pObjectNode - Node from which the field should be read. The parameter must not be null.
        pFieldName - Name of the field from which the value should be read. The parameter must not be null.
        pDefaultValue - Default value that should be used in case that the field is not present or null.
        Returns:
        long float of the passed field or its default value.
      • getDoubleValueFromNode

        protected final java.lang.Double getDoubleValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode,
                                                                java.lang.String pFieldName,
                                                                java.lang.Double pDefaultValue)
        Method returns the Double value from the field with the passed name from the passed JSON node.
        Parameters:
        pObjectNode - Node from which the field should be read. The parameter must not be null.
        pFieldName - Name of the field from which the value should be read. The parameter must not be null.
        pDefaultValue - Default value that should be used in case that the field is not present or null. The parameter may be null.
        Returns:
        Double Value of the passed field or its default value.
      • getBigDecimalValueFromNode

        protected final java.math.BigDecimal getBigDecimalValueFromNode​(com.fasterxml.jackson.databind.node.ObjectNode pObjectNode,
                                                                        java.lang.String pFieldName,
                                                                        java.math.BigDecimal pDefaultValue)
        Method returns the BigDecimal value from the field with the passed name from the passed JSON node.
        Parameters:
        pObjectNode - Node from which the field should be read. The parameter must not be null.
        pFieldName - Name of the field from which the value should be read. The parameter must not be null.
        pDefaultValue - Default value that should be used in case that the field is not present or null. The parameter may be null.
        Returns:
        BigDecimal Value of the passed field or its default value.