public void update(CassandraPersistenceSession session, EventSubscriptionEntity entity) { session.addStatement(createUpdateStatement(session, entity), entity.getProcessInstanceId()); for (IndexHandler<EventSubscriptionEntity> index : indexHandlers.values()) { session.addIndexStatement( index.getInsertStatement(session, entity), entity.getProcessInstanceId()); } }
public void delete(CassandraPersistenceSession session, EventSubscriptionEntity entity) { session.addStatement( QueryBuilder.delete() .mapElt("event_subscriptions", entity.getId()) .from(ProcessInstanceTableHandler.TABLE_NAME) .where(eq("id", entity.getProcessInstanceId())), entity.getProcessInstanceId()); for (IndexHandler<EventSubscriptionEntity> index : indexHandlers.values()) { session.addIndexStatement( index.getDeleteStatement(session, entity), entity.getProcessInstanceId()); } }