Converting Ibatis to Mybatis

3.4k views Asked by At

I am new to this frameworks I have a project which uses spring-ibatis .my job is to convert that to spring-mybatis.Can anyone suggest me what would be the starting point to accomplish this Job. import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import java.util.*;

public class PortTrackerDataDAOImpl extends SqlMapClientDaoSupport implements PortTrackerDataDAO {

    public List<?> getTypeLookup()
    {
        return this.getSqlMapClientTemplate().queryForList("getTypeLookup", null);
    }

    public List<?> getNavLookup()
    {
        return this.getSqlMapClientTemplate().queryForList("getNavLookup", null);
    }

    public List<?> getMarketDays(Date extractDate)
    {
        return this.getSqlMapClientTemplate().queryForList("getMarketDays", extractDate);
    }

    public List<?> getAccountDetail(Integer webUserId)
    {
        return this.getSqlMapClientTemplate().queryForList("getAccountDetail", webUserId);
    }

    public List<?> getFalPositions(String acctNo)
    {
        return this.getSqlMapClientTemplate().queryForList("getFalPositions", acctNo);
    }

    public Double getFalBalance(String acctNo)
    {
        return (Double) this.getSqlMapClientTemplate().queryForObject("getFalBalance", acctNo);
    }

    public Double getDSTShares(String fundNo, String region, String acctNo)
    {
        Map<String, String> parm = createParameterMap( fundNo,  region,  acctNo);
        return (Double) this.getSqlMapClientTemplate().queryForObject("getDSTShares", parm);
    }

    public List<?> getFlaggedUsers(Date updatedDt)
    {
        return this.getSqlMapClientTemplate().queryForList("getFlaggedUsers", updatedDt);
    }

    public List<?> getFlaggedUsersOnly()
    {
        return this.getSqlMapClientTemplate().queryForList("getFlaggedUsersOnly", null);
    }

    public void resetFlaggedUsers(Integer webUserId)
    {
        this.getSqlMapClientTemplate().update("resetFlaggedUsers", webUserId);
    }

    private Map<String, String> createParameterMap(String fundNo, String region, String acctNo)
    {

        Map<String, String> paramMap = new TreeMap<String, String>();
        paramMap.put("region", region);
        paramMap.put("fundNo", fundNo);
        paramMap.put("acctNo", acctNo);

        return paramMap;
    }

}
0

There are 0 answers