All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fitbur.fasterxml.jackson.databind.deser.impl.ObjectIdReader Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package com.fitbur.fasterxml.jackson.databind.com.fitburser.impl;

import com.fitbur.fasterxml.jackson.annotation.ObjectIdGenerator;

import com.fitbur.fasterxml.jackson.databind.*;
import com.fitbur.fasterxml.jackson.databind.com.fitburser.SettableBeanProperty;

/**
 * Object that knows how to serialize Object Ids.
 */
public final class ObjectIdReader
    implements java.io.Serializable
{
    private static final long serialVersionUID = 1L;

    public final JavaType idType;

    public final String propertyName;
    
    /**
     * Blueprint generator instance: actual instance will be
     * fetched from {@link SerializerProvider} using this as
     * the key.
     */
    public final ObjectIdGenerator generator;
    
    /**
     * Deserializer used for com.fitburserializing id values.
     */
    public final JsonDeserializer com.fitburserializer;

    public final SettableBeanProperty idProperty;
    
    /*
    /**********************************************************
    /* Life-cycle
    /**********************************************************
     */
    
    @SuppressWarnings("unchecked")
    protected ObjectIdReader(JavaType t, String propName, ObjectIdGenerator gen,
            JsonDeserializer com.fitburser, SettableBeanProperty idProp)
    {
        idType = t;
        propertyName = propName;
        generator = gen;
        com.fitburserializer = (JsonDeserializer) com.fitburser;
        idProperty = idProp;
    }

    /**
     * Factory method called by {@link com.fitbur.fasterxml.jackson.databind.ser.std.BeanSerializerBase}
     * with the initial information based on standard settings for the type
     * for which serializer is being built.
     */
    public static ObjectIdReader construct(JavaType idType, String propName,
            ObjectIdGenerator generator, JsonDeserializer com.fitburser,
            SettableBeanProperty idProp)
    {
        return new ObjectIdReader(idType, propName, generator, com.fitburser, idProp);
    }
}