All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yixsoft.support.mybatis.utils.ResultMapUtils Maven / Gradle / Ivy

There is a newer version: 2.0.3
Show newest version
package com.yixsoft.support.mybatis.utils;

import org.apache.ibatis.mapping.ResultMap;
import org.apache.ibatis.mapping.ResultMapping;
import org.apache.ibatis.session.Configuration;

import java.util.ArrayList;
import java.util.List;

/**
 * build json type resultMap
 * Created by yixian on 2015-09-02.
 */
public class ResultMapUtils {
    public static List createJsonResultMap(Configuration configuration, String statementId, Class resultType) {
        ResultMap.Builder builder = new ResultMap.Builder(configuration, statementId + "-Inline", resultType, new ArrayList());
        ResultMap map = builder.build();
        List maps = new ArrayList<>();
        maps.add(map);
        return maps;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy