@Override public void afterPropertiesSet() throws Exception { super.afterPropertiesSet(); if (queryProvider == null) { Assert.notNull(entityManagerFactory, "EntityManager is required when queryProvider is null"); Assert.hasLength(queryString, "Query string is required when queryProvider is null"); } }
@Override public void afterPropertiesSet() throws Exception { super.afterPropertiesSet(); Assert.state(fetchSize >= 0, "fetchSize must not be negative"); helper.afterPropertiesSet(); }
/** * Check mandatory properties. * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet() */ @Override public void afterPropertiesSet() throws Exception { super.afterPropertiesSet(); Assert.notNull(dataSource, "DataSource may not be null"); JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); if (fetchSize != VALUE_NOT_SET) { jdbcTemplate.setFetchSize(fetchSize); } jdbcTemplate.setMaxRows(getPageSize()); namedParameterJdbcTemplate = new NamedParameterJdbcTemplate(jdbcTemplate); Assert.notNull(queryProvider, "QueryProvider may not be null"); queryProvider.init(dataSource); this.firstPageSql = queryProvider.generateFirstPageQuery(getPageSize()); this.remainingPagesSql = queryProvider.generateRemainingPagesQuery(getPageSize()); }
@Override public void afterPropertiesSet() throws Exception { super.afterPropertiesSet(); if (queryProvider == null) { Assert.notNull(entityManagerFactory, "EntityManager is required when queryProvider is null"); Assert.hasLength(queryString, "Query string is required when queryProvider is null"); } }
/** * Check mandatory properties. * * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet() */ public void afterPropertiesSet() throws Exception { super.afterPropertiesSet(); this.setPageSize(defaultPageSize); }
@Override public void afterPropertiesSet() throws Exception { super.afterPropertiesSet(); Assert.state(fetchSize >= 0, "fetchSize must not be negative"); helper.afterPropertiesSet(); }
/** * Check mandatory properties. * * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet() */ @Override public void afterPropertiesSet() throws Exception { super.afterPropertiesSet(); notNull(sqlSessionFactory); sqlSessionTemplate = new DynamicSqlSessionTemplate(new SqlSessionTemplate(sqlSessionFactory, ExecutorType.BATCH)); notNull(queryId); }
/** * Check mandatory properties. * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet() */ @Override public void afterPropertiesSet() throws Exception { super.afterPropertiesSet(); Assert.notNull(dataSource, "DataSource may not be null"); JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); if (fetchSize != VALUE_NOT_SET) { jdbcTemplate.setFetchSize(fetchSize); } jdbcTemplate.setMaxRows(getPageSize()); namedParameterJdbcTemplate = new NamedParameterJdbcTemplate(jdbcTemplate); Assert.notNull(queryProvider, "QueryProvider may not be null"); queryProvider.init(dataSource); this.firstPageSql = queryProvider.generateFirstPageQuery(getPageSize()); this.remainingPagesSql = queryProvider.generateRemainingPagesQuery(getPageSize()); }