• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 386
  • Last Modified:

spring JDBC OO fashion




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.
0
gudii9
Asked:
gudii9
2 Solutions
 
Sathish David Kumar NCommented:
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now