package sikd.sikd5.sikd5ejb.dao.transaksi;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.SqlSession;

import sikd.sikd5.sikd5bean.fault.SIKDServiceException;
import sikd.sikd5.sikd5bean.tabel.transaksi.Headerlog;
import sikd.sikd5.sikd5bean.ws.transaksi.Headerlog_WS;
import sikd.sikd5.sikd5ejb.mapper.transaksi.HeaderlogMapper;

/**
*@oleh    : agus
*@tanggal : Apr 10, 2019
*/
public class HeaderLogDao {

	public long insertHeaderlog(Headerlog_WS record, SqlSession session) throws SIKDServiceException {
		HeaderlogMapper mapper = session.getMapper(HeaderlogMapper.class);
		return mapper.insert(record);
	}
//	public List<Headerlog> getHeaderLogByExample(HeaderlogExample ex,SqlSession session) throws SIKDServiceException {
//		HeaderlogMapper mapper = session.getMapper(HeaderlogMapper.class);
//		return mapper.selectByExample(ex);
//	}
//	public void updateByPrimaryKeySelective(Headerlog record,SqlSession session) throws SIKDServiceException {
//		HeaderlogMapper mapper = session.getMapper(HeaderlogMapper.class);
//		mapper.updateByPrimaryKeySelective(record);
//	}
	 public int updatePengiriman(long headerlogid, int diinsert,int diubah,int dihapus, Date selesaitglpengiriman, SqlSession session)
	 throws SIKDServiceException{
		 HeaderlogMapper mapper = session.getMapper(HeaderlogMapper.class);
		 return mapper.updatePengiriman(headerlogid, diinsert, diubah,dihapus, selesaitglpengiriman);
	 };
}
