5 pts.
 How should I make the SQL in iBatis having Parameter of ListMap?
How should I make the SQL in iBatis having Parameter of List<Map>?

When I search primery key at a table having two primery key, I have plural parameters as a parameter. This parameter is List<Map>.

It is an example of Parameter as follows

EX)

1. parameter

List<Map> paramList = new ArrayList<Map>();

Map<String, Object> map1 = new HashMap<String, Object>(); map1.put("PK1", "aaa"); map1.put("PK2", "bbb");

Map<String, Object> map2 = new HashMap<String, Object>(); map2.put("PK1", "ccc"); map2.put("PK2", "ddd");

paramList.add(map1); paramList.add(map2);

2. SQL

SELECT * FROM T1TABLE WHERE PK1 = ? AND PK2 = ?

Return is List<Map>!

thank you



Software/Hardware used:
ASKED: March 8, 2010  5:17 AM
UPDATED: March 8, 2010  1:04 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _