an easy way to start adding selection criteria to your mapped statements and can be
designated by using one of two different methods.
The first method is by using the hash (#) syntax. Here is an example using that
syntax to pass a simple inline parameter in to get a single Account bean out by its
<select id="getByIdValue" resultClass="Account">
where accountId = #value#
The #value# string in this mapped statement is a placeholder that tells i BATIS that
you are going to pass in a simple parameter that it needs to apply to the SQL
before executing it. This mapped statement could be called this way:
account = (Account) sqlMap.queryForObject(
Let's take a few minutes to look into what the i BATIS framework does with this
statement. First, it looks up the mapped statement named Account.getByIdValue ,
and transforms the #value# placeholder into a prepared statement parameter:
where accountId = ?