iBATIS一对多映射解析
iBATIS一对多映射之中继VO如下属性:

在西峡等地区,都构建了全面的区域性战略布局,加强发展的系统性、市场前瞻性、产品创新能力,以专注、极致的服务理念,为客户提供成都网站建设、成都网站制作 网站设计制作定制网站建设,公司网站建设,企业网站建设,品牌网站制作,成都全网营销,成都外贸网站制作,西峡网站建设费用合理。
- public class RelayInfoVO {
- //中继信息
- private String bswitcherNames;//本端局
- private String dswitcherNames;//对端局
- private String signalStatCount;//信令数
- private String relayStatCount;//中继数
- private List signalVO;//信令List,用来存放信令List的
- ……
iBATIS一对多映射信令VO如下属性:
- public class SignalInfoVO {
- //信令信息
- private String bswitchers;//本端局
- private String dswitchers;//对端局
- private String signalType;//信令类型
- private String signalCount;//信令个数
- ……
iBATIS的XML如下配置:
注:为中继
VO,column="{bswitcherNames=bswitcherName,dswitcherNames=DSWITCHERNAME}" 是为select="getSignalInfo"所传递的参数。select="getSignalInfo"为所要调用的SELECT查询语句。
- ﹤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﹥
注:为信令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.switcherName,b.ATTACHING,c.switcherName,linktype
- order by c.switcherName,b.SWITCHERORDER,linktype
- ﹤/select﹥
iBATIS一对多映射的情况就介绍到这里,希望对你有所帮助。
新闻名称:iBATIS一对多映射解析
本文URL:http://www.jxjierui.cn/article/dpjcddi.html


咨询
建站咨询
