Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to parse one-to-many mapping of iBATIS

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

In this issue, the editor will bring you an analysis of how to carry out iBATIS one-to-many mapping. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

The iBATIS one-to-many mapping relay VO has the following attributes:

Public class RelayInfoVO {/ / relay information private String bswitcherNames;// local office private String dswitcherNames;// opposite end office private String signalStatCount;// signaling number private String relayStatCount;// trunk number private List signalVO;// signaling List, used to store signaling List.

IBATIS one-to-many mapping signaling VO has the following attributes:

Public class SignalInfoVO {/ / signaling information private String bswitchers;// local office private String dswitchers;// peer office private String signalType;// signaling type private String signalCount;// signaling number...

The XML of iBATIS is configured as follows:

Note: for relay

VO,column= "{bswitcherNames=bswitcherName,dswitcherNames=DSWITCHERNAME}" is the parameter passed for select= "getSignalInfo". Select= "getSignalInfo" is the SELECT query statement to be invoked.

< resultMap id= "RelayInfoVO-Result-list" class= "com.harvest.ermis.rscount.domain.RelayInfoVO" > < result property= "bswitcherNames" column= "BSWITCHERNAME" nullValue= "" / > < result property= "dswitcherNames" column= "DSWITCHERNAME" nullValue= "/ > < result property=" signalStatCount "column=" SIGNALSTATCOUNT "nullValue="/ > < result property=" relayStatCount "column=" RELAYSTATCOUNT "nullValue=" / > < result property= "signalVO" column= "{bswitcherNames=bswitcherName,dswitcherNames=DSWITCHERNAME}" select= "getSignalInfo" / > < / resultMap >

Note: for signaling VO

< resultMap id= "SignalInfoVO-Result-list" class= "com.harvest.ermis.rscount.domain.SignalInfoVO" > < result property= "bswitchers" column= "BSWITCHERS" nullValue= "" / > < result property= "dswitchers" column= "DSWITCHERS" nullValue= "" / > < result property= "signalType" column= "SIGNALTYPE" nullValue= "" / > < result property= "signalCount" column= "SIGCOUTN" nullValue= "/ > < / resultMap > < select id=" getRSInfo "resultMap=" RelayInfoVO-Result-list ">. < / select > elect id= "getSignalInfo" resultMap= "SignalInfoVO-Result-list" > select c.switcherName as BSWITCHERS,b.switcherName as DSWITCHERS,linkType as SIGNALTYPE,count (*) as SIGCOUTN where c.switcherName=#bswitcherNames# and b.switcherName=#dswitcherNames# group by b.switcherNameRegy b.ATTACHING remark c.switcherNamereachtype order by c.switcherNameLinkageb.SWITCHERORDERLinktyp < / select >

This is the end of the one-to-many mapping of iBATIS. I hope it will help you.

The above is the editor for you to share how to analyze the iBATIS one-to-many mapping, if you happen to have similar doubts, you might as well refer to the above analysis. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report