Examples of generateFirstPageQuery()


Examples of org.springframework.batch.item.database.PagingQueryProvider.generateFirstPageQuery()

    } catch (Exception e) {
      logger.error(e.getMessage(),e);
      return null;
    }
   
    String query = queryProvider.generateFirstPageQuery(maxResult);
   
   
    //this.getJdbcTemplate().setQueryTimeout(1000); 
   
   
View Full Code Here

Examples of org.springframework.batch.item.database.PagingQueryProvider.generateFirstPageQuery()

    PagingQueryProvider queryProvider = getPagingQueryProvider(whereClause);

    List<StepExecution> stepExecutions;
    if (start <= 0) {
      stepExecutions = getJdbcTemplate().query(queryProvider.generateFirstPageQuery(count),
          new StepExecutionRowMapper(), jobName, stepName);
    }
    else {
      try {
        Long startAfterValue = getJdbcTemplate().queryForObject(
View Full Code Here

Examples of org.springframework.batch.item.database.PagingQueryProvider.generateFirstPageQuery()

  @Test
  public void testWhereClause() throws Exception {
    factory.setWhereClause("x=y");
    PagingQueryProvider provider = factory.getObject();
    String query = provider.generateFirstPageQuery(100);
    assertTrue("Wrong query: "+query, query.contains("x=y"));
  }

  @Test
  public void testAscending() throws Exception {
View Full Code Here

Examples of org.springframework.batch.item.database.PagingQueryProvider.generateFirstPageQuery()

  }

  @Test
  public void testAscending() throws Exception {
    PagingQueryProvider provider = factory.getObject();
    String query = provider.generateFirstPageQuery(100);
    assertTrue("Wrong query: "+query, query.contains("ASC"));
  }

  @Test(expected=IllegalArgumentException.class)
  public void testWrongDatabaseType() throws Exception {
View Full Code Here

Examples of org.springframework.batch.item.database.support.AbstractSqlPagingQueryProvider.generateFirstPageQuery()

    queryProvider.setGroupClause("NAME, CODE");

    int count = 0;
    int total = 5;

    List<Map<String, Object>> list = jdbcTemplate.queryForList(queryProvider.generateFirstPageQuery(pageSize));
    logger.debug("First page result: " + list);
    assertEquals(pageSize, list.size());
    count += pageSize;
    Map<String, Object> oldValues = null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.