alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Spring Framework example source code file (LineItem.xml)

This example Spring Framework source code file (LineItem.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Spring Framework tags/keywords

doctype, doctype, lineitem, lineitem, map, map, public, sql, utf-8, utf-8

The Spring Framework LineItem.xml source code

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">

<sqlMap namespace="LineItem">

  <resultMap id="result" class="org.springframework.samples.jpetstore.domain.LineItem">
    <result property="orderId" column="orderid" columnIndex="1"/>
    <result property="lineNumber" column="linenum" columnIndex="2"/>
    <result property="itemId" column="itemid" columnIndex="3"/>
    <result property="quantity" column="quantity" columnIndex="4"/>
    <result property="unitPrice" column="unitprice" columnIndex="5"/>
  </resultMap>

  <select id="getLineItemsByOrderId" resultMap="result">
    select orderid, linenum, itemid, quantity, unitprice from lineitem where orderid = #value#
  </select>

  <insert id="insertLineItem">
    insert into lineitem (orderid, linenum, itemid, quantity, unitprice) values (#orderId#, #lineNumber#, #itemId#, #quantity#, #unitPrice#)
  </insert>

</sqlMap>

Other Spring Framework examples (source code examples)

Here is a short list of links related to this Spring Framework LineItem.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.