How should I make the SQL in iBatis having Parameter of ListMap?

5 pts.
Tags:
iBATIS
SQL
SQL Parameters
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

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following