batch.addOrUpdate(Condition.eq(CategoryView.FIELD_EXTID, ce.getExtId()), tuple);
elementViewBath.addOrUpdate(Condition.eq(ElementView.FIELD_EXTID, ce.getExtId()), ser); bookPublisherViewBatch.addOrUpdate(Condition.eq(BookPublisherView.FIELD_EXTID, ce.getExtId()), tuple); institutionEntityViewBatch.addOrUpdate(Condition.eq(InstitutionEntityView.FIELD_EXTID, ce.getExtId()), tuple);
@Override protected Chunk doProcessChunk(final Chunk data, final Map<String, Serializable> context, final IProcessListener processListener, final ProcessingStats stats) throws Exception { final Batch batch = browserFacade.relation(TypeView.TYPE_VIEW_NAME).batch(); for (final CatalogElement ce : data.getItems()) { try { if (ce.isDeleted()) { batch.delete(Condition.eq(TypeView.FIELD_EXTID, ce.getId().getId())); } else if (ce.getElement() == null && ce.getNonElement() != null) { String extId = null; extId = ce.getNonElement().getExtId(); final Serializable[] tuple = TypeView.asTuple(ce.getNonElement()); batch.addOrUpdate(Condition.eq(TypeView.FIELD_EXTID, extId), tuple); } else if (ce.isDeleted()) { batch.delete(Condition.eq(TypeView.FIELD_EXTID, ce.getExtId())); } } catch (final Exception e) { log.error("Exception processing element " + ce.getExtId()); if (processListener != null) { processListener.notifyEvent("typeViewGenerator.process", new String[]{ce.getExtId()}, EventResultCode.ERROR, StackTraceUtil.getStackTrace(e)); } throw e; } } batch.run(); return data; }
if (o != null) { final String archiveid = o.getId().getId(); batch.addOrUpdate(Condition.eq(ContentView.ARCHIVE_ID, archiveid), ContentView.tuple(archiveid, articleid, issn, cf.getMimeType(), ce.getExtId()));