@Override public void setupModule(SetupContext context) { if (_serializers != null) { context.addSerializers(_serializers); } if (_deserializers != null) { context.addDeserializers(_deserializers); } if (_keySerializers != null) { context.addKeySerializers(_keySerializers); } if (_keyDeserializers != null) { context.addKeyDeserializers(_keyDeserializers); } if (_abstractTypes != null) { context.addAbstractTypeResolver(_abstractTypes); } if (_valueInstantiators != null) { context.addValueInstantiators(_valueInstantiators); } if (_subtypes != null && _subtypes.size() > 0) { context.registerSubtypes(_subtypes.toArray(new NamedType[_subtypes.size()])); } if (_mixins != null) { for (Map.Entry<Class<?>, Class<?>> entry : _mixins.entrySet()) { context.setMixInAnnotations(entry.getKey(), entry.getValue()); } } }
@Override public void setupModule(SetupContext context) { MongoAnnotationIntrospector annotationIntrospector = new MongoAnnotationIntrospector(context.getTypeFactory()); context.insertAnnotationIntrospector(annotationIntrospector); context.addSerializers(new CustomSerializers()); context.addDeserializers(new CustomDeserializers()); }
@Override public void setupModule(SetupContext context) { /* First, append annotation introspector (no need to override, esp. * as we just implement couple of methods) */ // Then add serializers we need AnnotationIntrospector ai = annotationIntrospector(); if (ai != null) { context.appendAnnotationIntrospector(ai); } context.addSerializers(new HibernateSerializers(_moduleFeatures)); }
@Override public void setupModule(SetupContext context) { MongoAnnotationIntrospector annotationIntrospector = new MongoAnnotationIntrospector(context.getTypeFactory()); context.insertAnnotationIntrospector(annotationIntrospector); // Only include non null properties, this makes it possible to use // object templates for querying and // partial object retrieving context.addDeserializationProblemHandler(new ServerErrorProblemHandler()); context.addSerializers(new TweakedMongoJackSerializers()); context.addDeserializers(new TweakedMongoJackDeserializers()); context.addDeserializers(new MongoJackDeserializers()); context.addAbstractTypeResolver(new CustomAbstractTypeResolver()); }
@Override public void setupModule(SetupContext context) { /* First, append annotation introspector (no need to override, esp. * as we just implement couple of methods) */ // Then add serializers we need AnnotationIntrospector ai = annotationIntrospector(); if (ai != null) { context.appendAnnotationIntrospector(ai); } boolean forceLoading = isEnabled(Feature.FORCE_LAZY_LOADING); context.addSerializers( new HibernateSerializers( forceLoading, isEnabled(Feature.SERIALIZE_IDENTIFIER_FOR_LAZY_NOT_LOADED_OBJECTS), _mapping)); context.addBeanSerializerModifier(new HibernateSerializerModifier(forceLoading)); }