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

import java.util.Date;

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 BusinessB implements Business<BatchParameter> {
	public int doExecute(BatchParameter parameter) {
		Logger log = parameter.getLog();
		log.info(this.getClass().getSimpleName());

		SqlSession sqlSession = parameter.getSqlSession();
		Pet newPet = new Pet();
		newPet.setPetId(10);
		newPet.setPetName("たま");
		newPet.setOwnerName("東京太郎");
		newPet.setPrice(3000);
		newPet.setBirthDate(new Date());
		sqlSession.insert("com.xxxxxxx.drvpp.biz.batch.xyz.dao.PetMapper.insertPet", newPet);
		
		return 0;
	}

}
