package com.xxxxxxx.drvpp.biz.web.xyz.business;

import org.apache.ibatis.session.SqlSession;

import com.xxxxxxx.drvpp.biz.web.xyz.domain.Pet;
import com.xxxxxxx.drvpp.fw.common.log.Logger;
import com.xxxxxxx.drvpp.fw.web.util.Business;
import com.xxxxxxx.drvpp.fw.web.util.WebParameter;

public class BusinessA implements Business<WebParameter> {

	@Override
	public int doExecute(WebParameter parameter) {
		Logger log = parameter.getLog();
		log.info(this.getClass().getSimpleName());

		SqlSession sqlSession = parameter.getSqlSession();
		// パラメータが1 つのバインディング
		Pet pet = sqlSession.selectOne("com.xxxxxxx.drvpp.biz.web.xyz.dao.PetMapper.selectPet", 1);
		if (pet != null) {
			System.out.println(pet.getPetName());
		}
		return 0;
	}

}
