
org.hibernate.search.mapper.pojo.impl.PojoBaseBeanConfigurer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-search-mapper-pojo-base Show documentation
Show all versions of hibernate-search-mapper-pojo-base Show documentation
Abstract base and common implementations for Hibernate Search Mappers for POJOs
The newest version!
/*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.mapper.pojo.impl;
import org.hibernate.search.engine.environment.bean.BeanReference;
import org.hibernate.search.engine.environment.bean.spi.BeanConfigurationContext;
import org.hibernate.search.engine.environment.bean.spi.BeanConfigurer;
import org.hibernate.search.mapper.pojo.tenancy.TenantIdentifierConverter;
import org.hibernate.search.mapper.pojo.tenancy.spi.StringTenantIdentifierConverter;
import org.hibernate.search.mapper.pojo.work.IndexingPlanSynchronizationStrategy;
import org.hibernate.search.mapper.pojo.work.IndexingPlanSynchronizationStrategyNames;
public class PojoBaseBeanConfigurer implements BeanConfigurer {
@Override
public void configure(BeanConfigurationContext context) {
context.define(
IndexingPlanSynchronizationStrategy.class,
IndexingPlanSynchronizationStrategyNames.ASYNC,
BeanReference.ofInstance( IndexingPlanSynchronizationStrategy.async() )
);
context.define(
IndexingPlanSynchronizationStrategy.class,
IndexingPlanSynchronizationStrategyNames.WRITE_SYNC,
BeanReference.ofInstance( IndexingPlanSynchronizationStrategy.writeSync() )
);
context.define(
IndexingPlanSynchronizationStrategy.class,
IndexingPlanSynchronizationStrategyNames.READ_SYNC,
BeanReference.ofInstance( IndexingPlanSynchronizationStrategy.readSync() )
);
context.define(
IndexingPlanSynchronizationStrategy.class,
IndexingPlanSynchronizationStrategyNames.SYNC,
BeanReference.ofInstance( IndexingPlanSynchronizationStrategy.sync() )
);
context.define(
TenantIdentifierConverter.class,
StringTenantIdentifierConverter.NAME,
BeanReference.ofInstance( StringTenantIdentifierConverter.INSTANCE )
);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy