spring JDBC OO fashion

Posted on 2011-05-06
Last Modified: 2012-05-11

I was reading folowing lines and I did not understand clearly.

writing JDBC code in a much
cleaner fashion. But the code was still tightly coupled to SQL. This is not necessarily
a bad thing. But what if we want to write JDBC code in a more OO fashion?
Spring provides a way to actually model database operations as objects. This adds
another layer of insulation between your code and straight JDBC.
Spring provides classes for both reading and writing data. As we work through
some examples of these, there are a couple of things you should know. First, these
database operation objects are thread-safe, meaning you need to create only one
instance per database operation. Second, any database operation object must be
compiled before being used. This lets the object know when to prepare the statement
so that it can be executed later. Not surprisingly, you compile a database operation
object by calling the compile() method. We will demonstrate this practice in
To start off, let’s see how we would create an object to write data to
the database.

Any ideas, resources,sample code,links, highly appreciated. thanks in advance.
Question by:gudii9
    LVL 20

    Accepted Solution

    LVL 92

    Assisted Solution


    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
    Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
    Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
    Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now