How to prepare a parameter map with an List property?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to prepare a parameter map with an List property?

ankit.khujneri
Hi,
 
I want to prepare a parameter map that has a list property also.
 
<parameterMap id = "Gold" class = "requestVO">
   
   <parameter property = "previousDate" jdbcType = "DATE" javaType = "java.lang.String"/>
   <parameter property = "currentDate" jdbcType = "DATE" javaType = "java.lang.String"/>
   <parameter property = "keyList" jdbcType = "INTEGER" javaType = "java.lang.Integer"/>
   
   </parameterMap>
 
 <select id="Team"
 parameterMap="Gold"
  resultClass="resultTO">
 
  SELECT YEAR(T.TIMEKEY) AS year,MONTH(T.TIMEKEY) AS month,
  SUM(S.SPLTFACACCTCNT) AS dataCount FROM
  TAB1 S,TAB2 T
  WHERE S.TIMEKEY=T.TIMEKEY AND T.TIMEKEY BETWEEN ? AND
  ?
  AND  S.KEY IN
  <iterate open="("
   close=")" conjunction=",">
   ?
  </iterate>
  AND T.MO IN ('03','06','09','12')  GROUP BY T.TIMEKEY ORDER BY T.TIMEKEY WITH UR
 
 </select>
 
Thanks in Advance
 
Regards
Ankit

Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com

Reply | Threaded
Open this post in threaded view
|

Re: How to prepare a parameter map with an List property?

kiran vuppla
You should add the list attribute inside the <iterate> tag.

<select id="Team"
 parameterMap="Gold"
  resultClass="resultTO">
 
  SELECT YEAR(T.TIMEKEY) AS year,MONTH(T.TIMEKEY) AS month,
  SUM(S.SPLTFACACCTCNT) AS dataCount FROM
  TAB1 S,TAB2 T
  WHERE S.TIMEKEY=T.TIMEKEY AND T.TIMEKEY BETWEEN #
previousDate# AND #currentDate#
  <iterate property="list" open=" AND S.KEY IN ("
   close=")" conjunction=",">
    #
keyList[]#
  </iterate>
  AND T.MO IN ('03','06','09','12')  GROUP BY T.TIMEKEY ORDER BY T.TIMEKEY WITH UR
 
 </select>

-Kiran


--- On Wed, 11/5/08, [hidden email] <[hidden email]> wrote:
From: [hidden email] <[hidden email]>
Subject: How to prepare a parameter map with an List property?
To: [hidden email]
Date: Wednesday, November 5, 2008, 5:36 AM

Hi,
 
I want to prepare a parameter map that has a list property also.
 
<parameterMap id = "Gold" class = "requestVO">
   
   <parameter property = "previousDate" jdbcType = "DATE" javaType = "java.lang.String"/>
   <parameter property = "currentDate" jdbcType = "DATE" javaType = "java.lang.String"/>
   <parameter property = "keyList" jdbcType = "INTEGER" javaType = "java.lang.Integer"/>
   
   </parameterMap>
 
 <select id="Team"
 parameterMap="Gold"
  resultClass="resultTO">
 
  SELECT YEAR(T.TIMEKEY) AS year,MONTH(T.TIMEKEY) AS month,
  SUM(S.SPLTFACACCTCNT) AS dataCount FROM
  TAB1 S,TAB2 T
  WHERE S.TIMEKEY=T.TIMEKEY AND T.TIMEKEY BETWEEN ? AND
  ?
  AND  S.KEY IN
  <iterate open="("
   close=")" conjunction=",">
   ?
  </iterate>
  AND T.MO IN ('03','06','09','12')  GROUP BY T.TIMEKEY ORDER BY T.TIMEKEY WITH UR
 
 </select>
 
Thanks in Advance
 
Regards
Ankit

Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com


Reply | Threaded
Open this post in threaded view
|

RE: How to prepare a parameter map with an List property?

kangsin
thanks for sharing this video with us samuel...
 
and i was just checkin our individul assignment..as well as group presentation..
 
i think we should decide our topic pretty soon..today is wednesday already..
 
and our indi assignment is according the the topic of group presentation.
 

Individual Reflective Essay

This deliverable is a structured essay of a maximum of 3000 words. The essay is required to be critical in its nature. Starting from the selected topic for the formative presentation and the identified individual research question/focus, each student has to undertake further literature review (4 journal papers or peer reviewed conference proceedings) in addition to the items identified for the presentation.

 
leader~~ leader~~~AMY~~~ where are you~~~~~??




Date: Wed, 5 Nov 2008 10:22:56 -0800
From: [hidden email]
Subject: Re: How to prepare a parameter map with an List property?
To: [hidden email]


You should add the list attribute inside the <iterate> tag.

<select id="Team"
 parameterMap="Gold"
  resultClass="resultTO">
 
  SELECT YEAR(T.TIMEKEY) AS year,MONTH(T.TIMEKEY) AS month,
  SUM(S.SPLTFACACCTCNT) AS dataCount FROM
  TAB1 S,TAB2 T
  WHERE S.TIMEKEY=T.TIMEKEY AND T.TIMEKEY BETWEEN #
previousDate# AND #currentDate#
  <iterate property="list" open=" AND S.KEY IN ("
   close=")" conjunction=",">
    #
keyList[]#
  </iterate>
  AND T.MO IN ('03','06','09','12')  GROUP BY T.TIMEKEY ORDER BY T.TIMEKEY WITH UR
 
 </select>

-Kiran


--- On Wed, 11/5/08, [hidden email] <[hidden email]> wrote:
From: [hidden email] <[hidden email]>
Subject: How to prepare a parameter map with an List property?
To: [hidden email]
Date: Wednesday, November 5, 2008, 5:36 AM

Hi,
 
I want to prepare a parameter map that has a list property also.
 
<parameterMap id = "Gold" class = "requestVO">
   
   <parameter property = "previousDate" jdbcType = "DATE" javaType = "java.lang.String"/>
   <parameter property = "currentDate" jdbcType = "DATE" javaType = "java.lang.String"/>
   <parameter property = "keyList" jdbcType = "INTEGER" javaType = "java.lang.Integer"/>
   
   </parameterMap>
 
 <select id="Team"
 parameterMap="Gold"
  resultClass="resultTO">
 
  SELECT YEAR(T.TIMEKEY) AS year,MONTH(T.TIMEKEY) AS month,
  SUM(S.SPLTFACACCTCNT) AS dataCount FROM
  TAB1 S,TAB2 T
  WHERE S.TIMEKEY=T.TIMEKEY AND T.TIMEKEY BETWEEN ? AND
  ?
  AND  S.KEY IN
  <iterate open="("
   close=")" conjunction=",">
   ?
  </iterate>
  AND T.MO IN ('03','06','09','12')  GROUP BY T.TIMEKEY ORDER BY T.TIMEKEY WITH UR
 
 </select>
 
Thanks in Advance
 
Regards
Ankit
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com

Reply | Threaded
Open this post in threaded view
|

RE: How to prepare a parameter map with an List property?

kangsin
In reply to this post by kiran vuppla
i applogize..i sent wrong email..sorry didn't meat to


Date: Wed, 5 Nov 2008 10:22:56 -0800
From: [hidden email]
Subject: Re: How to prepare a parameter map with an List property?
To: [hidden email]

You should add the list attribute inside the <iterate> tag.

<select id="Team"
 parameterMap="Gold"
  resultClass="resultTO">
 
  SELECT YEAR(T.TIMEKEY) AS year,MONTH(T.TIMEKEY) AS month,
  SUM(S.SPLTFACACCTCNT) AS dataCount FROM
  TAB1 S,TAB2 T
  WHERE S.TIMEKEY=T.TIMEKEY AND T.TIMEKEY BETWEEN #
previousDate# AND #currentDate#
  <iterate property="list" open=" AND S.KEY IN ("
   close=")" conjunction=",">
    #
keyList[]#
  </iterate>
  AND T.MO IN ('03','06','09','12')  GROUP BY T.TIMEKEY ORDER BY T.TIMEKEY WITH UR
 
 </select>

-Kiran


--- On Wed, 11/5/08, [hidden email] <[hidden email]> wrote:
From: [hidden email] <[hidden email]>
Subject: How to prepare a parameter map with an List property?
To: [hidden email]
Date: Wednesday, November 5, 2008, 5:36 AM

Hi,
 
I want to prepare a parameter map that has a list property also.
 
<parameterMap id = "Gold" class = "requestVO">
   
   <parameter property = "previousDate" jdbcType = "DATE" javaType = "java.lang.String"/>
   <parameter property = "currentDate" jdbcType = "DATE" javaType = "java.lang.String"/>
   <parameter property = "keyList" jdbcType = "INTEGER" javaType = "java.lang.Integer"/>
   
   </parameterMap>
 
 <select id="Team"
 parameterMap="Gold"
  resultClass="resultTO">
 
  SELECT YEAR(T.TIMEKEY) AS year,MONTH(T.TIMEKEY) AS month,
  SUM(S.SPLTFACACCTCNT) AS dataCount FROM
  TAB1 S,TAB2 T
  WHERE S.TIMEKEY=T.TIMEKEY AND T.TIMEKEY BETWEEN ? AND
  ?
  AND  S.KEY IN
  <iterate open="("
   close=")" conjunction=",">
   ?
  </iterate>
  AND T.MO IN ('03','06','09','12')  GROUP BY T.TIMEKEY ORDER BY T.TIMEKEY WITH UR
 
 </select>
 
Thanks in Advance
 
Regards
Ankit
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com