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

import org.apache.ibatis.session.SqlSession;

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

public class BusinessA implements Business<BatchParameter> {
	public int doExecute(BatchParameter parameter) {
		Logger log = parameter.getLog();
		log.info(this.getClass().getSimpleName());

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