public Iterable<?> simpleExportAndGetWithPagination() { // --------------------------------------------------------- final OperationChain<Iterable<?>> opChain = new OperationChain.Builder() .first(new GetAllElements()) .then(new ExportToSet<>()) .then(new DiscardOutput()) .then(new GetSetExport.Builder() .start(2) .end(4) .build()) .build(); // --------------------------------------------------------- return runExample(opChain, null); }
public Iterable<?> simpleExportAndGetWithPagination() { // --------------------------------------------------------- final OperationChain<Iterable<?>> opChain = new OperationChain.Builder() .first(new GetAllElements()) .then(new ExportToSet<>()) .then(new DiscardOutput()) .then(new GetSetExport.Builder() .start(2) .end(4) .build()) .build(); // --------------------------------------------------------- return runExample(opChain, null); }
public JobDetail getJobDetailsInOperationChain() { // --------------------------------------------------------- final OperationChain<JobDetail> opChain = new OperationChain.Builder() .first(new GetAllElements()) .then(new DiscardOutput()) .then(new GetJobDetails()) .build(); // --------------------------------------------------------- final JobDetail jobDetail = runExample(opChain, null); jobId = jobDetail.getJobId(); return jobDetail; } }
public Iterable<? extends EntitySeed> toStreamExample() { // --------------------------------------------------------- final OperationChain<Iterable<? extends EntitySeed>> opChain = new OperationChain.Builder() .first(new GetElements.Builder() .input(new EntitySeed(1), new EntitySeed(2)) .build()) .then(new ToEntitySeeds()) .build(); // --------------------------------------------------------- return runExample(opChain, null); } }
public Iterable<?> simpleExportAndGet() { // --------------------------------------------------------- final OperationChain<Iterable<?>> opChain = new OperationChain.Builder() .first(new GetAllElements()) .then(new ExportToSet<>()) .then(new DiscardOutput()) .then(new GetSetExport()) .build(); // --------------------------------------------------------- return runExample(opChain, null); }
public List<? extends Element> toListExample() { // --------------------------------------------------------- final OperationChain<List<? extends Element>> opChain = new OperationChain.Builder() .first(new GetElements.Builder() .input(new EntitySeed(1), new EntitySeed(2)) .build()) .then(new ToList<>()) .build(); // --------------------------------------------------------- return runExample(opChain, null); } }
public Iterable<?> simpleExportAndGet() { // --------------------------------------------------------- final OperationChain<Iterable<?>> opChain = new OperationChain.Builder() .first(new GetAllElements()) .then(new ExportToSet<>()) .then(new DiscardOutput()) .then(new GetSetExport()) .build(); // --------------------------------------------------------- return runExample(opChain, null); }
public Set<? extends Element> withToSetOperation() { // --------------------------------------------------------- final OperationChain<Set<? extends Element>> opChain = new OperationChain.Builder() .first(new GetElements.Builder() .input(new EntitySeed(1), new EntitySeed(2)) .build()) .then(new ToSet<>()) .build(); // --------------------------------------------------------- return runExample(opChain, null); } }
public CloseableIterable<?> simpleExportAndGet() { // --------------------------------------------------------- final OperationChain<CloseableIterable<?>> opChain = new OperationChain.Builder() .first(new GetAllElements()) .then(new ExportToGafferResultCache<>()) .then(new DiscardOutput()) .then(new GetGafferResultCacheExport()) .build(); // --------------------------------------------------------- return runExample(opChain, null); }
public CloseableIterable<?> simpleExportAndGet() { // --------------------------------------------------------- final OperationChain<CloseableIterable<?>> opChain = new OperationChain.Builder() .first(new GetAllElements()) .then(new ExportToGafferResultCache<>()) .then(new DiscardOutput()) .then(new GetGafferResultCacheExport()) .build(); // --------------------------------------------------------- return runExample(opChain, null); }
public CloseableIterable<?> getExport() { // --------------------------------------------------------- final OperationChain<CloseableIterable<?>> opChain = new OperationChain.Builder() .first(new GetGafferResultCacheExport.Builder() .jobId(jobDetail.getJobId()) .build()) .build(); // --------------------------------------------------------- return runExample(opChain, null); }
public void limitElementsTo3WithoutTruncation() { // --------------------------------------------------------- final OperationChain<Iterable<? extends Element>> opChain = new OperationChain.Builder() .first(new GetAllElements()) .then(new Limit<>(3, false)) .build(); // --------------------------------------------------------- showExample(opChain, "Setting this flag to false will " + "throw an error instead of truncating the iterable. " + "In this case there are more than 3 elements, so " + "when executed a LimitExceededException would be thrown."); }
public Iterable<? extends Element> limitElementsTo3() { // --------------------------------------------------------- final OperationChain<Iterable<? extends Element>> opChain = new OperationChain.Builder() .first(new GetAllElements()) .then(new Limit<>(3)) .build(); // --------------------------------------------------------- return runExample(opChain, null); }
public Stream<? extends Element> toStreamExample() { // --------------------------------------------------------- final OperationChain<Stream<? extends Element>> opChain = new Builder() .first(new GetElements.Builder() .input(new EntitySeed(1), new EntitySeed(2)) .build()) .then(new ToStream<>()) .build(); // --------------------------------------------------------- return runExample(opChain, null); } }
public GroupCounts countAllElementGroupsWithLimit() { // --------------------------------------------------------- final OperationChain<GroupCounts> opChain = new OperationChain.Builder() .first(new GetAllElements()) .then(new CountGroups(5)) .build(); // --------------------------------------------------------- return runExample(opChain, null); } }
public GroupCounts countAllElementGroups() { // --------------------------------------------------------- final OperationChain<GroupCounts> opChain = new OperationChain.Builder() .first(new GetAllElements()) .then(new CountGroups()) .build(); // --------------------------------------------------------- return runExample(opChain, null); }
public JobDetail exportAndGetJobDetails() { // --------------------------------------------------------- final OperationChain<JobDetail> opChain = new OperationChain.Builder() .first(new GetAllElements()) .then(new ExportToGafferResultCache<>()) .then(new DiscardOutput()) .then(new GetJobDetails()) .build(); // ---------------------------------------------- ----------- jobDetail = runExample(opChain, null); return jobDetail; }
public Element[] toArrayExample() { // --------------------------------------------------------- final OperationChain<? extends Element[]> opChain = new OperationChain.Builder() .first(new GetElements.Builder() .input(new EntitySeed(1), new EntitySeed(2)) .build()) .then(new ToArray<>()) .build(); // --------------------------------------------------------- return runExample(opChain, null); } }
public JobDetail exportAndGetJobDetails() { // --------------------------------------------------------- final OperationChain<JobDetail> exportOpChain = new OperationChain.Builder() .first(new GetAllElements()) .then(new ExportToGafferResultCache<>()) .then(new DiscardOutput()) .then(new GetJobDetails()) .build(); // --------------------------------------------------------- jobDetail = runExample(exportOpChain, null); return jobDetail; }
public CloseableIterable<?> getExport() { // --------------------------------------------------------- final OperationChain<CloseableIterable<?>> opChain = new OperationChain.Builder() .first(new GetGafferResultCacheExport.Builder() .jobId(jobDetail.getJobId()) .build()) .build(); // --------------------------------------------------------- return runExample(opChain, null); }