Codota Logo
SqlPagingQueryUtils.generateRowNumSqlQuery
Code IndexAdd Codota to your IDE (free)

How to use
generateRowNumSqlQuery
method
in
org.springframework.batch.item.database.support.SqlPagingQueryUtils

Best Java code snippets using org.springframework.batch.item.database.support.SqlPagingQueryUtils.generateRowNumSqlQuery (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: spring-projects/spring-batch

@Override
public String generateFirstPageQuery(int pageSize) {
  return SqlPagingQueryUtils.generateRowNumSqlQuery(this, false, buildRowNumClause(pageSize));
}
origin: spring-projects/spring-batch

@Override
public String generateRemainingPagesQuery(int pageSize) {
  return SqlPagingQueryUtils.generateRowNumSqlQuery(this, true, buildRowNumClause(pageSize));
}
origin: spring-projects/spring-batch

/**
 * Generate SQL query string using a ROW_NUM condition
 * 
 * @param provider {@link AbstractSqlPagingQueryProvider} providing the
 * implementation specifics
 * @param remainingPageQuery is this query for the remaining pages (true) as
 * opposed to the first page (false)
 * @param rowNumClause the implementation specific row num clause to be used
 * @return the generated query
 */
public static String generateRowNumSqlQuery(AbstractSqlPagingQueryProvider provider, boolean remainingPageQuery,
    String rowNumClause) {
  return generateRowNumSqlQuery(provider, provider.getSelectClause(), remainingPageQuery, rowNumClause);
}
origin: spring-projects/spring-batch

@Test
public void testGenerateRowNumSqlQueryDescending() {
  sortKeys.put("ID", Order.DESCENDING);
  AbstractSqlPagingQueryProvider qp = new TestSqlPagingQueryProvider("FOO", "BAR", sortKeys);
  assertEquals(
      "SELECT * FROM (SELECT FOO FROM BAR ORDER BY ID DESC) WHERE ROWNUMBER <= 100",
      SqlPagingQueryUtils.generateRowNumSqlQuery(qp, false, "ROWNUMBER <= 100"));
  assertEquals(
      "SELECT * FROM (SELECT FOO FROM BAR ORDER BY ID DESC) WHERE ROWNUMBER <= 100 AND ((ID < ?))",
      SqlPagingQueryUtils.generateRowNumSqlQuery(qp, true, "ROWNUMBER <= 100"));
  qp.setWhereClause("BAZ IS NOT NULL");
  assertEquals(
      "SELECT * FROM (SELECT FOO FROM BAR WHERE BAZ IS NOT NULL ORDER BY ID DESC) WHERE ROWNUMBER <= 100",
      SqlPagingQueryUtils.generateRowNumSqlQuery(qp, false, "ROWNUMBER <= 100"));
  assertEquals(
      "SELECT * FROM (SELECT FOO FROM BAR WHERE BAZ IS NOT NULL ORDER BY ID DESC) WHERE ROWNUMBER <= 100 AND ((ID < ?))",
      SqlPagingQueryUtils.generateRowNumSqlQuery(qp, true, "ROWNUMBER <= 100"));
}
origin: spring-projects/spring-batch

@Test
public void testGenerateRowNumSqlQuery() {
  AbstractSqlPagingQueryProvider qp = new TestSqlPagingQueryProvider("FOO", "BAR", sortKeys);
  assertEquals(
      "SELECT * FROM (SELECT FOO FROM BAR ORDER BY ID ASC) WHERE ROWNUMBER <= 100",
      SqlPagingQueryUtils.generateRowNumSqlQuery(qp, false, "ROWNUMBER <= 100"));
  assertEquals(
      "SELECT * FROM (SELECT FOO FROM BAR ORDER BY ID ASC) WHERE ROWNUMBER <= 100 AND ((ID > ?))",
      SqlPagingQueryUtils.generateRowNumSqlQuery(qp, true, "ROWNUMBER <= 100"));
  qp.setWhereClause("BAZ IS NOT NULL");
  assertEquals(
      "SELECT * FROM (SELECT FOO FROM BAR WHERE BAZ IS NOT NULL ORDER BY ID ASC) WHERE ROWNUMBER <= 100",
      SqlPagingQueryUtils.generateRowNumSqlQuery(qp, false, "ROWNUMBER <= 100"));
  assertEquals(
      "SELECT * FROM (SELECT FOO FROM BAR WHERE BAZ IS NOT NULL ORDER BY ID ASC) WHERE ROWNUMBER <= 100 AND ((ID > ?))",
      SqlPagingQueryUtils.generateRowNumSqlQuery(qp, true, "ROWNUMBER <= 100"));
}
origin: apache/servicemix-bundles

@Override
public String generateFirstPageQuery(int pageSize) {
  return SqlPagingQueryUtils.generateRowNumSqlQuery(this, false, buildRowNumClause(pageSize));
}
origin: apache/servicemix-bundles

@Override
public String generateRemainingPagesQuery(int pageSize) {
  return SqlPagingQueryUtils.generateRowNumSqlQuery(this, true, buildRowNumClause(pageSize));
}
origin: apache/servicemix-bundles

/**
 * Generate SQL query string using a ROW_NUM condition
 * 
 * @param provider {@link AbstractSqlPagingQueryProvider} providing the
 * implementation specifics
 * @param remainingPageQuery is this query for the remaining pages (true) as
 * opposed to the first page (false)
 * @param rowNumClause the implementation specific row num clause to be used
 * @return the generated query
 */
public static String generateRowNumSqlQuery(AbstractSqlPagingQueryProvider provider, boolean remainingPageQuery,
    String rowNumClause) {
  return generateRowNumSqlQuery(provider, provider.getSelectClause(), remainingPageQuery, rowNumClause);
}
org.springframework.batch.item.database.supportSqlPagingQueryUtilsgenerateRowNumSqlQuery

Javadoc

Generate SQL query string using a ROW_NUM condition

Popular methods of SqlPagingQueryUtils

  • generateLimitJumpToQuery
    Generate SQL query string using a LIMIT clause
  • generateLimitSqlQuery
    Generate SQL query string using a LIMIT clause
  • generateRowNumSqlQueryWithNesting
  • generateTopJumpToQuery
    Generate SQL query string using a TOP clause
  • generateTopSqlQuery
    Generate SQL query string using a TOP clause
  • buildGroupByClause
  • buildSortClause
    Generates ORDER BY attributes based on the sort keys.
  • buildSortConditions
    Appends the where conditions required to query for the subsequent pages.
  • buildSortKeySelect
  • buildWhereClause
  • generateGroupedTopSqlQuery
    Generate SQL query string using a TOP clause
  • generateLimitGroupedSqlQuery
    Generate SQL query string using a LIMIT clause
  • generateGroupedTopSqlQuery,
  • generateLimitGroupedSqlQuery

Popular in Java

  • Running tasks concurrently on multiple threads
  • setScale (BigDecimal)
  • getApplicationContext (Context)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
  • JButton (javax.swing)
  • JCheckBox (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now