Figure 4
Manually written SQL in the iBATIS framework

  
  <?xml version="1.0" encoding="UTF-8" ?> 
  <!DOCTYPE sqlMap (View Source for full doctype...)> 
- <sqlMap namespace="Account">
  <select id="getAccount" resultClass="com.denoncourt.Account" parameterClass="java.lang.String">SELECT CUSNUM as number, LSTNAM as name, BALDUE as balance FROM qcustcdt WHERE CUSNUM = #value#</select> 
  <insert id="insertAccount" parameterClass="com.denoncourt.Account">INSERT INTO qcustcdt (CUSNUM, LSTNAM, BALDUE) VALUES (#number#, #name#, #balance#)</insert> 
  <update id="updateAccount" parameterClass="com.denoncourt.Account">UPDATE qcustcdt SET BALDUE = #balance# WHERE CUSNUM = #number#</update> 
  <delete id="deleteAccount" parameterClass="java.lang.Integer">DELETE FROM qcustcdt WHERE CUSNUM = #value#</delete> 
  </sqlMap>