package cn.com.poc.covenant.service.impl;

import cn.com.poc.covenant.model.BizExtreactionContractTypeModel;
import cn.com.poc.covenant.repository.BizExtreactionContractTypeRepository;
import cn.com.poc.covenant.service.BizExtreactionContractTypeService;
import cn.com.yict.framemax.core.service.impl.BaseServiceImpl;
import cn.com.yict.framemax.data.model.PagingInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collection;
import java.util.List;

@Service
public class BizExtreactionContractTypeServiceImpl extends BaseServiceImpl
 			 implements BizExtreactionContractTypeService {
   
   @Resource
   private BizExtreactionContractTypeRepository repository;
    			 
   public BizExtreactionContractTypeModel get(Integer id) throws Exception{
       return this.repository.get(id);
   }
    
   public List<BizExtreactionContractTypeModel> findByExample(BizExtreactionContractTypeModel example,PagingInfo pagingInfo) throws Exception{
       if(example == null){
           example = new BizExtreactionContractTypeModel();
       }
       return this.repository.findByExample(example,pagingInfo);
   }
    
   public void delete(BizExtreactionContractTypeModel model) throws Exception{
       this.repository.remove(model);
   }
    
   public void deleteById(Integer id) throws Exception{
       this.repository.removeByPk(id);
   }
   
   public void deleteAll(Collection<Integer> ids) throws Exception{
   	   this.repository.removeAllByPk(ids);
   }
    
   public BizExtreactionContractTypeModel save(BizExtreactionContractTypeModel model) throws Exception{
       return this.repository.save(model);
   }
    
   public Collection<BizExtreactionContractTypeModel> saveAll(Collection<BizExtreactionContractTypeModel> models) throws Exception{
       return this.repository.saveAll(models);
   }    	
}