com.fasterxml.jackson.databind.deser.impl

## Class ObjectIdReader

- java.lang.Object
- - com.fasterxml.jackson.databind.deser.impl.ObjectIdReader

- All Implemented Interfaces:
    Serializable

      public class ObjectIdReader
      extends Object
      implements Serializable

  Object that knows how to deserialize Object Ids.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected JsonDeserializer<Object>` | `_deserializer` Deserializer used for deserializing id values.
    `protected JavaType` | `_idType`
    `ObjectIdGenerator<?>` | `generator` Blueprint generator instance: actual instance will be fetched from `SerializerProvider` using this as the key.
    `SettableBeanProperty` | `idProperty`
    `PropertyName` | `propertyName`
    `ObjectIdResolver` | `resolver`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ObjectIdReader(JavaType t, PropertyName propName, ObjectIdGenerator<?> gen, JsonDeserializer<?> deser, SettableBeanProperty idProp)` Deprecated.
    `protected` | `ObjectIdReader(JavaType t, PropertyName propName, ObjectIdGenerator<?> gen, JsonDeserializer<?> deser, SettableBeanProperty idProp, ObjectIdResolver resolver)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ObjectIdReader` | `construct(JavaType idType, PropertyName propName, ObjectIdGenerator<?> generator, JsonDeserializer<?> deser, SettableBeanProperty idProp)` Deprecated.
    `static ObjectIdReader` | `construct(JavaType idType, PropertyName propName, ObjectIdGenerator<?> generator, JsonDeserializer<?> deser, SettableBeanProperty idProp, ObjectIdResolver resolver)` Factory method called by `BeanSerializerBase` with the initial information based on standard settings for the type for which serializer is being built.
    `JsonDeserializer<Object>` | `getDeserializer()`
    `JavaType` | `getIdType()`
    `boolean` | `isValidReferencePropertyName(String name, JsonParser parser)` Convenience method, equivalent to calling: `readerInstance.generator.isValidReferencePropertyName(name, parser);` and used to determine whether Object Ids handled by the underlying generator may be in form of (JSON) Objects.
    `boolean` | `maySerializeAsObject()` Convenience method, equivalent to calling: `readerInstance.generator.maySerializeAsObject();` and used to determine whether Object Ids handled by the underlying generator may be in form of (JSON) Objects.
    `Object` | `readObjectReference(JsonParser jp, DeserializationContext ctxt)` Method called to read value that is expected to be an Object Reference (that is, value of an Object Id used to refer to another object).

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### _idType

          protected final JavaType _idType

    - #### propertyName

          public final PropertyName propertyName

    - #### generator

          public final ObjectIdGenerator<?> generator

      Blueprint generator instance: actual instance will be fetched from `SerializerProvider` using this as the key.

    - #### resolver

          public final ObjectIdResolver resolver

    - #### _deserializer

          protected final JsonDeserializer<Object> _deserializer

      Deserializer used for deserializing id values.

    - #### idProperty

          public final SettableBeanProperty idProperty

  - ### Constructor Detail

    - #### ObjectIdReader

          protected ObjectIdReader(JavaType t,
                        PropertyName propName,
                        ObjectIdGenerator<?> gen,
                        JsonDeserializer<?> deser,
                        SettableBeanProperty idProp,
                        ObjectIdResolver resolver)

    - #### ObjectIdReader

          @Deprecated
          protected ObjectIdReader(JavaType t,
                                   PropertyName propName,
                                   ObjectIdGenerator<?> gen,
                                   JsonDeserializer<?> deser,
                                   SettableBeanProperty idProp)

      Deprecated.

  - ### Method Detail

    - #### construct

          public static ObjectIdReader construct(JavaType idType,
                                 PropertyName propName,
                                 ObjectIdGenerator<?> generator,
                                 JsonDeserializer<?> deser,
                                 SettableBeanProperty idProp,
                                 ObjectIdResolver resolver)

      Factory method called by `BeanSerializerBase` with the initial information based on standard settings for the type for which serializer is being built.

    - #### construct

          @Deprecated
          public static ObjectIdReader construct(JavaType idType,
                                            PropertyName propName,
                                            ObjectIdGenerator<?> generator,
                                            JsonDeserializer<?> deser,
                                            SettableBeanProperty idProp)

      Deprecated.

    - #### getDeserializer

          public JsonDeserializer<Object> getDeserializer()

    - #### getIdType

          public JavaType getIdType()

    - #### maySerializeAsObject

          public boolean maySerializeAsObject()

      Convenience method, equivalent to calling: `readerInstance.generator.maySerializeAsObject();` and used to determine whether Object Ids handled by the underlying generator may be in form of (JSON) Objects. Used for optimizing handling in cases where method returns false.
      Since:
        2.5

    - #### isValidReferencePropertyName

          public boolean isValidReferencePropertyName(String name,
                                             JsonParser parser)

      Convenience method, equivalent to calling: `readerInstance.generator.isValidReferencePropertyName(name, parser);` and used to determine whether Object Ids handled by the underlying generator may be in form of (JSON) Objects. Used for optimizing handling in cases where method returns false.
      Since:
        2.5

    - #### readObjectReference

          public Object readObjectReference(JsonParser jp,
                                   DeserializationContext ctxt)
                                     throws IOException

      Method called to read value that is expected to be an Object Reference (that is, value of an Object Id used to refer to another object).
      Throws:
        `IOException`
      Since:
        2.3

Copyright © 2008–2016 FasterXML. All rights reserved.