public MapperConfigBase(BaseSettings paramBaseSettings, SubtypeResolver paramSubtypeResolver, Map<ClassKey, Class<?>> paramMap) { super(paramBaseSettings, DEFAULT_MAPPER_FEATURES); this._mixInAnnotations = paramMap; this._subtypeResolver = paramSubtypeResolver; this._rootName = null; this._view = null; }
public MapperConfigBase(MapperConfigBase<CFG, T> paramMapperConfigBase, SubtypeResolver paramSubtypeResolver) { super(paramMapperConfigBase); this._mixInAnnotations = paramMapperConfigBase._mixInAnnotations; this._subtypeResolver = paramSubtypeResolver; this._rootName = paramMapperConfigBase._rootName; this._view = paramMapperConfigBase._view; }
private SerializationConfig(SerializationConfig paramSerializationConfig, SubtypeResolver paramSubtypeResolver) { super(paramSerializationConfig, paramSubtypeResolver); this._serFeatures = paramSerializationConfig._serFeatures; this._serializationInclusion = paramSerializationConfig._serializationInclusion; this._filterProvider = paramSerializationConfig._filterProvider; }
private DeserializationConfig(DeserializationConfig paramDeserializationConfig, SubtypeResolver paramSubtypeResolver) { super(paramDeserializationConfig, paramSubtypeResolver); this._deserFeatures = paramDeserializationConfig._deserFeatures; this._nodeFactory = paramDeserializationConfig._nodeFactory; this._problemHandlers = paramDeserializationConfig._problemHandlers; }
public DeserializationConfig(BaseSettings paramBaseSettings, SubtypeResolver paramSubtypeResolver, Map<ClassKey, Class<?>> paramMap) { super(paramBaseSettings, paramSubtypeResolver, paramMap); this._deserFeatures = collectFeatureDefaults(DeserializationFeature.class); this._nodeFactory = JsonNodeFactory.instance; this._problemHandlers = null; }
public FoxtrotResourceTest() throws Exception { getObjectMapperFactory().setSerializationInclusion(JsonInclude.Include.NON_NULL); getObjectMapperFactory().setSerializationInclusion(JsonInclude.Include.NON_EMPTY); SubtypeResolver subtypeResolver = new StdSubtypeResolver(); getObjectMapperFactory().setSubtypeResolver(subtypeResolver); getObjectMapperFactory().disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); this.mapper = getObjectMapperFactory().build(); this.dataStore = TestUtils.getDataStore(); //Initializing Cache Factory hazelcastInstance = new TestHazelcastInstanceFactory(1).newHazelcastInstance(); HazelcastConnection hazelcastConnection = Mockito.mock(HazelcastConnection.class); when(hazelcastConnection.getHazelcast()).thenReturn(hazelcastInstance); this.cacheManager = new CacheManager(new DistributedCacheFactory(hazelcastConnection, mapper)); elasticsearchServer = new MockElasticsearchServer(UUID.randomUUID().toString()); ElasticsearchConnection elasticsearchConnection = Mockito.mock(ElasticsearchConnection.class); when(elasticsearchConnection.getClient()).thenReturn(elasticsearchServer.getClient()); ElasticsearchUtils.initializeMappings(elasticsearchServer.getClient()); Settings indexSettings = ImmutableSettings.settingsBuilder().put("number_of_replicas", 0).build(); CreateIndexRequest createRequest = new CreateIndexRequest(TableMapStore.TABLE_META_INDEX).settings(indexSettings); elasticsearchServer.getClient().admin().indices().create(createRequest).actionGet(); elasticsearchServer.getClient().admin().cluster().prepareHealth().setWaitForGreenStatus().execute().actionGet(); tableMetadataManager = Mockito.mock(TableMetadataManager.class); tableMetadataManager.start(); this.queryStore = new ElasticsearchQueryStore(tableMetadataManager, elasticsearchConnection, dataStore, mapper); this.queryStore = spy(queryStore); AnalyticsLoader analyticsLoader = new AnalyticsLoader(tableMetadataManager, dataStore, queryStore, elasticsearchConnection, cacheManager, mapper); analyticsLoader.start(); TestUtils.registerActions(analyticsLoader, mapper); ExecutorService executorService = Executors.newFixedThreadPool(1); queryExecutor = new QueryExecutor(analyticsLoader, executorService); }
/** * Constructor used when creating a new instance (compared to * that of creating fluent copies) */ protected MapperConfigBase(BaseSettings base, SubtypeResolver str, Map<ClassKey,Class<?>> mixins) { super(base, DEFAULT_MAPPER_FEATURES); _mixInAnnotations = mixins; _subtypeResolver = str; _rootName = null; _view = null; }
protected MapperConfigBase(MapperConfigBase<CFG,T> src, SubtypeResolver str) { super(src); _mixInAnnotations = src._mixInAnnotations; _subtypeResolver = str; _rootName = src._rootName; _view = src._view; }
/** * Constructor used by ObjectMapper to create default configuration object instance. */ public SerializationConfig(BaseSettings base, SubtypeResolver str, Map<ClassKey,Class<?>> mixins) { super(base, str, mixins); _serFeatures = collectFeatureDefaults(SerializationFeature.class); _filterProvider = null; }
private SerializationConfig(SerializationConfig src, SubtypeResolver str) { super(src, str); _serFeatures = src._serFeatures; _serializationInclusion = src._serializationInclusion; _filterProvider = src._filterProvider; }
/** * Constructor used by ObjectMapper to create default configuration object instance. */ public DeserializationConfig(BaseSettings base, SubtypeResolver str, Map<ClassKey,Class<?>> mixins) { super(base, str, mixins); _deserFeatures = collectFeatureDefaults(DeserializationFeature.class); _nodeFactory = JsonNodeFactory.instance; _problemHandlers = null; }
/** * Copy constructor used to create a non-shared instance with given mix-in * annotation definitions and subtype resolver. */ private DeserializationConfig(DeserializationConfig src, SubtypeResolver str) { super(src, str); _deserFeatures = src._deserFeatures; _nodeFactory = src._nodeFactory; _problemHandlers = src._problemHandlers; }
public final SubtypeResolver getSubtypeResolver() { return this._subtypeResolver; }
public SerializationConfig(BaseSettings paramBaseSettings, SubtypeResolver paramSubtypeResolver, Map<ClassKey, Class<?>> paramMap) { super(paramBaseSettings, paramSubtypeResolver, paramMap); this._serFeatures = collectFeatureDefaults(SerializationFeature.class); this._filterProvider = null; }
public final SerializationConfig with(SubtypeResolver paramSubtypeResolver) { if (paramSubtypeResolver == this._subtypeResolver) return this; return new SerializationConfig(this, paramSubtypeResolver); }
public final DeserializationConfig with(SubtypeResolver paramSubtypeResolver) { if (this._subtypeResolver == paramSubtypeResolver) return this; return new DeserializationConfig(this, paramSubtypeResolver); }
private void configureObjectMapper(Environment environment) { environment.getObjectMapperFactory().setSerializationInclusion(JsonInclude.Include.NON_NULL); environment.getObjectMapperFactory().disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); SubtypeResolver subtypeResolver = new StdSubtypeResolver(); environment.getObjectMapperFactory().setSubtypeResolver(subtypeResolver); }
@Override public SerializationConfig with(SubtypeResolver str) { return (str == _subtypeResolver)? this : new SerializationConfig(this, str); }
@Override public DeserializationConfig with(SubtypeResolver str) { return (_subtypeResolver == str) ? this : new DeserializationConfig(this, str); }
/** * Method for constructing and returning a new instance with different * {@link SubtypeResolver} * to use. *<p> * NOTE: make sure to register new instance with <code>ObjectMapper</code> * if directly calling this method. */ public abstract T with(SubtypeResolver str);
/** * Accessor for object used for finding out all reachable subtypes * for supertypes; needed when a logical type name is used instead * of class name (or custom scheme). */ @Override public final SubtypeResolver getSubtypeResolver() { return _subtypeResolver; }
public abstract SubtypeResolver getSubtypeResolver();
public abstract T with(SubtypeResolver paramSubtypeResolver);