Codota Logo
AbstractCursorItemReader.getDataSource
Code IndexAdd Codota to your IDE (free)

How to use
getDataSource
method
in
org.springframework.batch.item.database.AbstractCursorItemReader

Best Java code snippets using org.springframework.batch.item.database.AbstractCursorItemReader.getDataSource (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: spring-projects/spring-batch

protected void initializeConnection() {
  Assert.state(getDataSource() != null, "DataSource must not be null.");
  try {
    if (useSharedExtendedConnection) {
      if (!(getDataSource() instanceof ExtendedConnectionDataSourceProxy)) {
        throw new InvalidDataAccessApiUsageException(
            "You must use a ExtendedConnectionDataSourceProxy for the dataSource when " +
            "useSharedExtendedConnection is set to true.");
      }
      this.con = DataSourceUtils.getConnection(dataSource);
      ((ExtendedConnectionDataSourceProxy)dataSource).startCloseSuppression(this.con);
    }
    else {
      this.con = dataSource.getConnection();
    }
    this.initialConnectionAutoCommit = this.con.getAutoCommit();
    if (this.connectionAutoCommit != null && this.con.getAutoCommit() != this.connectionAutoCommit) {
      this.con.setAutoCommit(this.connectionAutoCommit);
    }
  }
  catch (SQLException se) {
    close();
    throw getExceptionTranslator().translate("Executing query", getSql(), se);
  }
}
origin: apache/servicemix-bundles

protected void initializeConnection() {
  Assert.state(getDataSource() != null, "DataSource must not be null.");
  try {
    if (useSharedExtendedConnection) {
      if (!(getDataSource() instanceof ExtendedConnectionDataSourceProxy)) {
        throw new InvalidDataAccessApiUsageException(
            "You must use a ExtendedConnectionDataSourceProxy for the dataSource when " +
            "useSharedExtendedConnection is set to true.");
      }
      this.con = DataSourceUtils.getConnection(dataSource);
      ((ExtendedConnectionDataSourceProxy)dataSource).startCloseSuppression(this.con);
    }
    else {
      this.con = dataSource.getConnection();
    }
    this.initialConnectionAutoCommit = this.con.getAutoCommit();
    if (this.connectionAutoCommit != null && this.con.getAutoCommit() != this.connectionAutoCommit) {
      this.con.setAutoCommit(this.connectionAutoCommit);
    }
  }
  catch (SQLException se) {
    close();
    throw getExceptionTranslator().translate("Executing query", getSql(), se);
  }
}
org.springframework.batch.item.databaseAbstractCursorItemReadergetDataSource

Javadoc

Public getter for the data source.

Popular methods of AbstractCursorItemReader

  • afterPropertiesSet
  • cleanupOnClose
  • close
  • getCurrentItemCount
  • getExceptionTranslator
    Creates a default SQLErrorCodeSQLExceptionTranslator for the specified DataSource if none is set.
  • getSql
  • initializeConnection
  • moveCursorToRow
    Moves the cursor in the ResultSet to the position specified by the row parameter by traversing the R
  • openCursor
  • readCursor
    Read the cursor and map to the type of object this reader should return. This method must be overrid
  • verifyCursorPosition
    Check the result set is in sync with the currentRow attribute. This is important to ensure that the
  • verifyCursorPosition

Popular in Java

  • Finding current android device location
  • getExternalFilesDir (Context)
  • startActivity (Activity)
  • addToBackStack (FragmentTransaction)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
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