Java Code Examples for org.springframework.data.jdbc.core.convert.JdbcConverter

The following examples show how to use org.springframework.data.jdbc.core.convert.JdbcConverter. These examples are extracted from open source projects. 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
public QuerydslJdbcRepositoryFactory(DataAccessStrategy dataAccessStrategy,
                                     RelationalMappingContext context,
                                     JdbcConverter converter,
                                     Dialect dialect, ApplicationEventPublisher publisher,
                                     NamedParameterJdbcOperations operations,
                                     SQLQueryFactory sqlQueryFactory) {
    super(dataAccessStrategy, context, converter, dialect, publisher, operations);
    this.publisher = publisher;
    this.context = context;
    this.converter = converter;
    this.accessStrategy = dataAccessStrategy;
    this.sqlQueryFactory = sqlQueryFactory;
}
 
Example 2
Source Project: spring-data-dev-tools   Source File: JdbcBenchmark.java    License: Apache License 2.0 5 votes vote down vote up
@Setup
@SuppressWarnings("unchecked")
public void setUp() {

	JdbcFixture fixture = new JdbcFixture(profile);

	this.bookMapper = fixture.getBookMapper();

	ConfigurableApplicationContext context = fixture.getContext();

	this.operations = context.getBean(JdbcOperations.class);
	this.repository = context.getBean(JdbcBookRepository.class);

	JdbcConverter converter = context.getBean(JdbcConverter.class);
	JdbcMappingContext mappingContext = context.getBean(JdbcMappingContext.class);

	RelationalPersistentEntity<Book> requiredPersistentEntity = (RelationalPersistentEntity<Book>) mappingContext
			.getRequiredPersistentEntity(Book.class);

	this.bookEntityMapper = new EntityRowMapper<Book>(requiredPersistentEntity, converter);

	// ResultSet mock

	this.columns = new TreeSet<>();
	columns.add("id");
	columns.add("title");
	columns.add("pages");

	this.values = new HashMap<>();
	values.put("id", 1L);
	values.put("title", "title0");
	values.put("pages", 42L);
}