org.springframework.data.mapping.callback.EntityCallbacks Java Examples
The following examples show how to use
org.springframework.data.mapping.callback.EntityCallbacks.
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: Neo4jTemplate.java From sdn-rx with Apache License 2.0 | 5 votes |
public Neo4jTemplate(Neo4jClient neo4jClient, Neo4jMappingContext neo4jMappingContext, DatabaseSelectionProvider databaseSelectionProvider) { Assert.notNull(neo4jClient, "The Neo4jClient is required"); Assert.notNull(neo4jMappingContext, "The Neo4jMappingContext is required"); Assert.notNull(databaseSelectionProvider, "The database name provider is required"); this.neo4jClient = neo4jClient; this.neo4jMappingContext = neo4jMappingContext; this.cypherGenerator = CypherGenerator.INSTANCE; this.eventSupport = new Neo4jEvents(EntityCallbacks.create()); this.databaseSelectionProvider = databaseSelectionProvider; }
Example #2
Source File: QuerydslJdbcRepositoryFactoryBean.java From infobip-spring-data-querydsl with Apache License 2.0 | 5 votes |
@Override public void afterPropertiesSet() { Assert.state(this.mappingContext != null, "MappingContext is required and must not be null!"); Assert.state(this.converter != null, "RelationalConverter is required and must not be null!"); if (this.operations == null) { Assert.state(beanFactory != null, "If no JdbcOperations are set a BeanFactory must be available."); this.operations = beanFactory.getBean(NamedParameterJdbcOperations.class); } if (this.dataAccessStrategy == null) { Assert.state(beanFactory != null, "If no DataAccessStrategy is set a BeanFactory must be available."); this.dataAccessStrategy = this.beanFactory.getBeanProvider(DataAccessStrategy.class) // .getIfAvailable(() -> { SqlGeneratorSource sqlGeneratorSource = new SqlGeneratorSource( this.mappingContext, this.converter, this.dialect); return new DefaultDataAccessStrategy(sqlGeneratorSource, this.mappingContext, this.converter, this.operations); }); } if (this.queryMappingConfiguration == null) { this.queryMappingConfiguration = QueryMappingConfiguration.EMPTY; } if (beanFactory != null) { entityCallbacks = EntityCallbacks.create(beanFactory); } super.afterPropertiesSet(); }
Example #3
Source File: Neo4jTemplate.java From sdn-rx with Apache License 2.0 | 4 votes |
@Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { this.eventSupport = new Neo4jEvents(EntityCallbacks.create(beanFactory)); }
Example #4
Source File: Neo4jTemplate.java From sdn-rx with Apache License 2.0 | 4 votes |
Neo4jEvents(EntityCallbacks entityCallbacks) { this.entityCallbacks = entityCallbacks; }
Example #5
Source File: QuerydslJdbcRepositoryFactory.java From infobip-spring-data-querydsl with Apache License 2.0 | 4 votes |
public void setEntityCallbacks(EntityCallbacks entityCallbacks) { super.setEntityCallbacks(entityCallbacks); this.entityCallbacks = entityCallbacks; }