org.springframework.data.repository.core.support.RepositoryFactorySupport Java Examples

The following examples show how to use org.springframework.data.repository.core.support.RepositoryFactorySupport. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: QuerydslJdbcRepositoryFactoryBean.java    From infobip-spring-data-querydsl with Apache License 2.0 6 votes vote down vote up
@Override
protected RepositoryFactorySupport doCreateRepositoryFactory() {

    QuerydslJdbcRepositoryFactory jdbcRepositoryFactory = new QuerydslJdbcRepositoryFactory(dataAccessStrategy,
                                                                                            mappingContext,
                                                                                            converter,
                                                                                            dialect,
                                                                                            publisher,
                                                                                            operations,
                                                                                            sqlQueryFactory
    );
    jdbcRepositoryFactory.setQueryMappingConfiguration(queryMappingConfiguration);
    jdbcRepositoryFactory.setEntityCallbacks(entityCallbacks);

    return jdbcRepositoryFactory;
}
 
Example #2
Source File: DatastoreRepositoryFactoryBean.java    From spring-cloud-gcp with Apache License 2.0 5 votes vote down vote up
@Override
protected RepositoryFactorySupport createRepositoryFactory() {
	DatastoreRepositoryFactory datastoreRepositoryFactory = new DatastoreRepositoryFactory(
			this.datastoreMappingContext, this.datastoreTemplate);
	datastoreRepositoryFactory.setApplicationContext(this.applicationContext);
	return datastoreRepositoryFactory;
}
 
Example #3
Source File: SpannerRepositoryFactoryBean.java    From spring-cloud-gcp with Apache License 2.0 5 votes vote down vote up
@Override
protected RepositoryFactorySupport createRepositoryFactory() {
	SpannerRepositoryFactory spannerRepositoryFactory = new SpannerRepositoryFactory(
			this.spannerMappingContext,
			this.spannerTemplate);
	spannerRepositoryFactory.setApplicationContext(this.applicationContext);
	return spannerRepositoryFactory;
}
 
Example #4
Source File: CosmosRepositoryFactoryBeanUnitTest.java    From spring-data-cosmosdb with MIT License 5 votes vote down vote up
@Test
public void testCreateRepositoryFactory() {
    final CosmosRepositoryFactoryBean factoryBean =
            new CosmosRepositoryFactoryBean(PersonRepository.class);
    final RepositoryFactorySupport factory = factoryBean.createRepositoryFactory();
    assertThat(factory).isNotNull();
}
 
Example #5
Source File: IgniteRepositoryFactoryBean.java    From ignite with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override protected RepositoryFactorySupport createRepositoryFactory() {
    try {
        Ignite ignite = (Ignite)ctx.getBean("igniteInstance");

        return new IgniteRepositoryFactory(ignite);
    }
    catch (BeansException ex) {
        try {
            IgniteConfiguration cfg = (IgniteConfiguration)ctx.getBean("igniteCfg");

            return new IgniteRepositoryFactory(cfg);
        }
        catch (BeansException ex2) {
            try {
                String path = (String)ctx.getBean("igniteSpringCfgPath");

                return new IgniteRepositoryFactory(path);
            }
            catch (BeansException ex3) {
                throw new IgniteException("Failed to initialize Ignite repository factory. Ignite instance or" +
                    " IgniteConfiguration or a path to Ignite's spring XML configuration must be defined in the" +
                    " application configuration");
            }
        }
    }
}
 
Example #6
Source File: SolrRepositoryFactoryBean.java    From dubbox with Apache License 2.0 5 votes vote down vote up
@Override
protected RepositoryFactorySupport doCreateRepositoryFactory() {

	SolrRepositoryFactory factory = operations != null ? new SolrRepositoryFactory(this.operations)
			: new SolrRepositoryFactory(this.solrClient);
	factory.setSchemaCreationSupport(schemaCreationSupport);
	return factory;
}
 
Example #7
Source File: DynamoDBRepositoryFactoryBean.java    From spring-data-dynamodb with Apache License 2.0 5 votes vote down vote up
@Override
protected RepositoryFactorySupport createRepositoryFactory() {
	if (dynamoDBOperations == null)
	{
		dynamoDBOperations = new DynamoDBTemplate(amazonDynamoDB,dynamoDBMapperConfig);
	}
	return new DynamoDBRepositoryFactory(dynamoDBOperations);
}
 
Example #8
Source File: TxleJpaRepositoryProxyFactory.java    From txle with Apache License 2.0 5 votes vote down vote up
protected RepositoryFactorySupport createRepositoryFactory(EntityManager entityManager) {
    try {
        JpaRepositoryFactory jpaFac = new JpaRepositoryFactory(entityManager);
        jpaFac.addRepositoryProxyPostProcessor((proxyFactory, repositoryInformation) -> proxyFactory.addAdvice((MethodInterceptor) methodInvocation -> txleJpaRepositoryInterceptor.doFilter(methodInvocation)));
        return jpaFac;
    } catch (Exception e) {
        return super.createRepositoryFactory(entityManager);
    }
}
 
Example #9
Source File: AppConfiguration.java    From ariADDna with Apache License 2.0 4 votes vote down vote up
@Bean
public RepositoryFactorySupport repositoryFactorySupport() {
    LOGGER.info("In bean repositoryFactorySupport() entity manager is : {}", em.toString());
    return new JpaRepositoryFactory(em);
}
 
Example #10
Source File: CustomJpaRepositoryFactoryBean.java    From spring-boot-jpa-data-rest-soft-delete with MIT License 4 votes vote down vote up
@Override
protected RepositoryFactorySupport createRepositoryFactory(EntityManager entityManager) {
	return new CustomJpaRepositoryFactory<T, ID>(entityManager);
}
 
Example #11
Source File: DefaultRepositoryFactoryBean.java    From HA-DB with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
protected RepositoryFactorySupport createRepositoryFactory(EntityManager entityManager) {
	return new DefaultRepositoryFactory(entityManager);
}
 
Example #12
Source File: CoreJpaRepositoryFactoryBean.java    From abixen-platform with GNU Lesser General Public License v2.1 4 votes vote down vote up
protected RepositoryFactorySupport createRepositoryFactory(EntityManager em) {
    return new PlatformJpaRepositoryFactory(em);
}
 
Example #13
Source File: EntityGraphJpaRepositoryFactoryBean.java    From spring-data-jpa-entity-graph with MIT License 4 votes vote down vote up
@Override
protected RepositoryFactorySupport createRepositoryFactory(EntityManager entityManager) {
  return new EntityGraphJpaRepositoryFactory(entityManager);
}
 
Example #14
Source File: IgniteRepositoryFactoryBean.java    From ignite with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override protected RepositoryFactorySupport createRepositoryFactory() {
    return new IgniteRepositoryFactory(ctx);
}
 
Example #15
Source File: AclElasticsearchRepositoryFactoryBean.java    From strategy-spring-security-acl with Apache License 2.0 4 votes vote down vote up
@Override
protected RepositoryFactorySupport createRepositoryFactory() {
  return new Factory(operations);
}
 
Example #16
Source File: ReactiveAggregateQuerySupportingRepositoryFactoryBean.java    From mongodb-aggregate-query-support with Apache License 2.0 4 votes vote down vote up
@Override
protected RepositoryFactorySupport getFactoryInstance(ReactiveMongoOperations operations) {
  Assert.notNull(queryExecutor, "Query executor cannot be null");
  return new ReactiveAggregateQuerySupportingRepositoryFactory(operations, queryExecutor);
}
 
Example #17
Source File: AclJpaRepositoryFactoryBean.java    From strategy-spring-security-acl with Apache License 2.0 4 votes vote down vote up
protected RepositoryFactorySupport createRepositoryFactory(EntityManager entityManager) {
  return new Factory(entityManager);
}
 
Example #18
Source File: IgniteRepositoryFactoryBean.java    From ignite with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override protected RepositoryFactorySupport createRepositoryFactory() {
    return new IgniteRepositoryFactory(ctx);
}
 
Example #19
Source File: QDataTablesRepositoryFactoryBean.java    From spring-data-jpa-datatables with Apache License 2.0 4 votes vote down vote up
protected RepositoryFactorySupport createRepositoryFactory(EntityManager entityManager) {
  return new DataTablesRepositoryFactory(entityManager);
}
 
Example #20
Source File: DataTablesRepositoryFactoryBean.java    From spring-data-jpa-datatables with Apache License 2.0 4 votes vote down vote up
protected RepositoryFactorySupport createRepositoryFactory(EntityManager entityManager) {
  return new DataTablesRepositoryFactory<T, ID>(entityManager);
}
 
Example #21
Source File: CrateRepositoryFactoryBean.java    From spring-data-crate with Apache License 2.0 4 votes vote down vote up
@Override
protected RepositoryFactorySupport createRepositoryFactory() {
	return new CrateRepositoryFactory(operations);
}
 
Example #22
Source File: AltTestRepositoryFactoryBeanSupport.java    From statefulj with Apache License 2.0 4 votes vote down vote up
@Override
protected RepositoryFactorySupport createRepositoryFactory() {
	return null;
}
 
Example #23
Source File: MockRepositoryFactoryBeanSupport.java    From statefulj with Apache License 2.0 4 votes vote down vote up
@Override
protected RepositoryFactorySupport createRepositoryFactory() {
	return null;
}
 
Example #24
Source File: KeyValueRepositoryFactoryBean.java    From spring-data-keyvalue with Apache License 2.0 4 votes vote down vote up
@Override
protected final RepositoryFactorySupport createRepositoryFactory() {
	return createRepositoryFactory(operations, queryCreator, repositoryQueryType);
}
 
Example #25
Source File: JooqRepositoryBean.java    From blog-examples with Apache License 2.0 4 votes vote down vote up
protected RepositoryFactorySupport createRepositoryFactory(EntityManager entityManager) {
	return new JooqJpaRepositoryFactory(entityManager, jooq);
}
 
Example #26
Source File: SimpleBaseRepositoryFactoryBean.java    From es with Apache License 2.0 4 votes vote down vote up
protected RepositoryFactorySupport createRepositoryFactory(EntityManager entityManager) {
    return new SimpleBaseRepositoryFactory(entityManager);
}
 
Example #27
Source File: SimpleDbRepositoryFactoryBean.java    From spring-data-simpledb with MIT License 4 votes vote down vote up
@Override
protected RepositoryFactorySupport createRepositoryFactory() {
	Assert.notNull(simpleDbOperations);

	return new SimpleDbRepositoryFactory(simpleDbOperations);
}
 
Example #28
Source File: BasicRepositoryFactoryBean.java    From base-framework with Apache License 2.0 4 votes vote down vote up
@Override
protected RepositoryFactorySupport createRepositoryFactory(EntityManager entityManager) {
	
	return new BasicJpaRepositoryFactory(entityManager);
}
 
Example #29
Source File: CosmosRepositoryFactoryBean.java    From spring-data-cosmosdb with MIT License 4 votes vote down vote up
protected RepositoryFactorySupport getFactoryInstance(ApplicationContext applicationContext) {
    return new CosmosRepositoryFactory(operations, applicationContext);
}
 
Example #30
Source File: Neo4jRepositoryFactoryBean.java    From sdn-rx with Apache License 2.0 4 votes vote down vote up
@Override
protected RepositoryFactorySupport doCreateRepositoryFactory() {
	return new Neo4jRepositoryFactory(neo4jOperations, neo4jMappingContext);
}