
org.ikasan.systemevent.service.SolrSystemEventServiceImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ikasan-solr-client Show documentation
Show all versions of ikasan-solr-client Show documentation
Ikasan EIP Solr Client Abstraction
The newest version!
package org.ikasan.systemevent.service;
import org.ikasan.spec.persistence.BatchInsert;
import org.ikasan.spec.solr.SolrService;
import org.ikasan.spec.solr.SolrServiceBase;
import org.ikasan.spec.systemevent.SystemEvent;
import org.ikasan.systemevent.dao.SolrSystemEventDaoImpl;
import java.util.List;
/**
* Created by Ikasan Development Team on 23/09/2017.
*/
public class SolrSystemEventServiceImpl extends SolrServiceBase implements SolrService, BatchInsert
{
private SolrSystemEventDaoImpl systemEventDao;
public SolrSystemEventServiceImpl(SolrSystemEventDaoImpl systemEventDao)
{
this.systemEventDao = systemEventDao;
if(this.systemEventDao == null)
{
throw new IllegalArgumentException("systemEventDao cannot be null!");
}
}
@Override
public void insert(List systemEvents)
{
this.save(systemEvents);
}
@Override
public void save(SystemEvent systemEvent)
{
this.systemEventDao.setSolrUsername(this.solrUsername);
this.systemEventDao.setSolrPassword(this.solrPassword);
systemEventDao.save(systemEvent);
}
@Override
public void save(List systemEvents)
{
this.systemEventDao.setSolrUsername(this.solrUsername);
this.systemEventDao.setSolrPassword(this.solrPassword);
systemEventDao.save(systemEvents);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy