是否可以使用3个泛型返回xmlmapper结果Map?

a9wyjsp7  于 2021-07-13  发布在  Java
关注(0)|答案(7)|浏览(314)
vlf7wbxs

vlf7wbxs2#

<select id="selectUserTikectList" resultMap="SelectRsultMap.ThreeRsult">
        select * from
        SEOULTHEATER THEATER, SEOULMOVIE MOVIE,SEOULTICKET TICKET, SEOULLOGIN
        LOGIN where
        TICKET.TICKET_MOVIE=MOVIE.MOVIE_NO and TICKET.TICKET_THEATER =THEATER.THEATER_NO and
        LOGIN.LOGIN_NO=TICKET.TICKET_ID
</select>
gj3fmq9x

gj3fmq9x4#

---------结果提供程序

gzjq41n4

gzjq41n45#


package xyz.itwill.dto;

import java.io.Serializable;

public class ResultProvider {

    public static class TwoRsult<V1, V2>  implements  Serializable{
        private static final long serialVersionUID = -1291817609922503918L;
        public V1 getV1() {
            return v1;
        }

        public void setV1(V1 v1) {
            this.v1 = v1;
        }

        public V2 getV2() {
            return v2;
        }

        public void setV2(V2 v2) {
            this.v2 = v2;
        }

        public TwoRsult() {
        }

        private V1 v1;
        private V2 v2;
    }
    public static class ThreeRsult<V1, V2,V3> implements  Serializable {    
        private static final long serialVersionUID = 2762104112034019755L;
        public V1 getV1() {
            return v1;
        }

        public void setV1(V1 v1) {
            this.v1 = v1;
        }

        public V2 getV2() {
            return v2;
        }

        public void setV2(V2 v2) {
            this.v2 = v2;
        }

        public ThreeRsult() {
        }

        private V1 v1;
        private V2 v2;
        private V3 v3;
        public V3 getV3() {
            return v3;
        }

        public void setV3(V3 v3) {
            this.v3 = v3;
        }
    }

}
dsf9zpds

dsf9zpds6#

-----结果提供程序

相关问题