code: public void bulkTransaction(final SecurityContext securityContext, final long commitCount, final StructrTransaction transaction, final Predicate<Long> stopCondition) throws FrameworkException {
  
  		final App app                = StructrApp.getInstance(securityContext);
  		final AtomicLong objectCount = new AtomicLong(0L);
  
  		if (stopCondition instanceof Filter) {
  			((Filter)stopCondition).setSecurityContext(securityContext);
  		}
  
  		while (!stopCondition.accept(objectCount.get())) {
  
  			try (final Tx tx = app.tx()) {
  
  				long loopCount = 0;
  
  				while (loopCount++ < commitCount && !stopCondition.accept(objectCount.get())) {
  
  					transaction.execute();
  					objectCount.incrementAndGet();
  				}
  
  				tx.success();
  			}
  		}
  	}
docs: Executes the given transaction until the stop condition evaluates to
  <b>true</b>.
  
  @param securityContext
  @param commitCount the number of executions after which the transaction is committed
  @param transaction the operation to execute
  @param stopCondition
  @throws FrameworkException