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

import cn.com.poc.appbuilder.model.BizAppbuilderConversationRecordModel;
import cn.com.poc.appbuilder.repository.BizAppbuilderConversationRecordRepository;
import cn.com.poc.appbuilder.service.BizAppbuilderConversationRecordService;
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 BizAppbuilderConversationRecordServiceImpl extends BaseServiceImpl
 			 implements BizAppbuilderConversationRecordService {
   
   @Resource
   private BizAppbuilderConversationRecordRepository repository;
    			 
   public BizAppbuilderConversationRecordModel get(Integer id) throws Exception{
       return this.repository.get(id);
   }
    
   public List<BizAppbuilderConversationRecordModel> findByExample(BizAppbuilderConversationRecordModel example,PagingInfo pagingInfo) throws Exception{
       if(example == null){
           example = new BizAppbuilderConversationRecordModel();
       }
       return this.repository.findByExample(example,pagingInfo);
   }
    
   public void delete(BizAppbuilderConversationRecordModel 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 BizAppbuilderConversationRecordModel save(BizAppbuilderConversationRecordModel model) throws Exception{
       return this.repository.save(model);
   }
    
   public Collection<BizAppbuilderConversationRecordModel> saveAll(Collection<BizAppbuilderConversationRecordModel> models) throws Exception{
       return this.repository.saveAll(models);
   }    	
}