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

import cn.com.poc.long_document.model.BizLongTextDialoguesRecordModel;
import cn.com.poc.long_document.repository.BizLongTextDialoguesRecordRepository;
import cn.com.poc.long_document.service.BizLongTextDialoguesRecordService;
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 BizLongTextDialoguesRecordServiceImpl extends BaseServiceImpl
 			 implements BizLongTextDialoguesRecordService {
   
   @Resource
   private BizLongTextDialoguesRecordRepository repository;
    			 
   public BizLongTextDialoguesRecordModel get(Long id) throws Exception{
       return this.repository.get(id);
   }
    
   public List<BizLongTextDialoguesRecordModel> findByExample(BizLongTextDialoguesRecordModel example,PagingInfo pagingInfo) throws Exception{
       if(example == null){
           example = new BizLongTextDialoguesRecordModel();
       }
       return this.repository.findByExample(example,pagingInfo);
   }
    
   public void delete(BizLongTextDialoguesRecordModel model) throws Exception{
       this.repository.remove(model);
   }
    
   public void deleteById(Long id) throws Exception{
       this.repository.removeByPk(id);
   }
   
   public void deleteAll(Collection<Long> ids) throws Exception{
   	   this.repository.removeAllByPk(ids);
   }
    
   public BizLongTextDialoguesRecordModel save(BizLongTextDialoguesRecordModel model) throws Exception{
       return this.repository.save(model);
   }
    
   public Collection<BizLongTextDialoguesRecordModel> saveAll(Collection<BizLongTextDialoguesRecordModel> models) throws Exception{
       return this.repository.saveAll(models);
   }    	
}