
com.fasterxml.jackson.module.hibernate.PersistentCollectionSerializer Maven / Gradle / Ivy
package com.fasterxml.jackson.module.hibernate;
import java.io.IOException;
import org.hibernate.collection.PersistentCollection;
import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.map.BeanProperty;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.JsonSerializer;
import org.codehaus.jackson.map.ResolvableSerializer;
import org.codehaus.jackson.map.SerializerProvider;
import org.codehaus.jackson.map.TypeSerializer;
import org.codehaus.jackson.type.JavaType;
/**
* Wrapper serializer used to handle aspects of lazy loading that can be used
* for Hibernate collection datatypes.
*/
public class PersistentCollectionSerializer
extends JsonSerializer
implements ResolvableSerializer
{
/**
* Property that has collection value to handle
*/
protected final BeanProperty _property;
protected final boolean _forceLazyLoading;
/**
* This is the nominal type used to locate actual serializer to use
* for contents, if this collection is to be serialized.
*/
protected final JavaType _serializationType;
/**
* Serializer to which we delegate if serialization is not blocked.
*/
protected JsonSerializer
© 2015 - 2025 Weber Informatics LLC | Privacy Policy