use of cz.mzk.recordmanager.server.util.HibernateSessionSynchronizer.SessionBinder in project RecordManager2 by moravianlibrary.
the class KrameriusItemReaderNoSorting method beforeStep.
@Override
public void beforeStep(StepExecution stepExecution) {
try (SessionBinder sess = hibernateSync.register()) {
conf = configDao.get(confId);
if (confId == null) {
throw new IllegalArgumentException(String.format("Kramerius harvest configuration with id=%s not found", confId));
}
KrameriusHarvesterParams params = new KrameriusHarvesterParams();
params.setUrl(conf.getUrl());
params.setMetadataStream(conf.getMetadataStream());
params.setQueryRows(conf.getQueryRows());
params.setFrom(fromDate);
params.setUntil(untilDate);
kHarvester = harvesterFactory.createNoSorting(params, confId);
}
}
Aggregations