Chapter 4. Working with mapped statements

 

This chapter covers

  • JavaBeans
  • Using the iBATIS API
  • Mapped statements
  • Using parameters and results

In previous chapters we looked at how to configure iBATIS SqlMaps, and you saw an example of a mapped statement. You should now have a foundation on which to start building more of the database access layer for an application.

This chapter and the next examine mapped statements in greater detail, and discuss using SQL maps to create them. In this chapter, we first look at mapped statements in general and what you need to know to use them. Then we explain how to get data out of the database using mapped statements that return typed objects (JavaBeans), and how to pass in parameters to limit the data being returned. In chapter 5, you will learn how to update a database with mapped statements.

4.1. Starting with the basics

There are a few conceptual challenges to understand before getting started with iBATIS. You will need to have a basic understanding of Java development using JavaBeans. You will also need to know what iBATIS makes available in terms of the types of SQL statements you can use, and the API that you need to use to execute those statements.

4.2. Using <select> mapped statements

 
 
 

4.3. Mapping parameters

 
 

4.4. Using inline and explicit result maps

 
 
 
 

4.5. Summary

 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest