@Test public void testExecute_IncludeRels() { SelectContext<Ts> context = new SelectContext<>(Ts.class); context.setMergedRequest(requestBuilderFactory.builder().addInclude(new Include("rtt")).build()); stage.execute(context); ResourceEntity<Ts> resourceEntity = context.getEntity(); assertNotNull(resourceEntity); assertTrue(resourceEntity.isIdIncluded()); assertEquals(2, resourceEntity.getAttributes().size()); assertTrue(resourceEntity.getAttributes().containsKey("m")); assertTrue(resourceEntity.getAttributes().containsKey("n")); assertEquals(1, resourceEntity.getChildren().size()); assertEquals(1, resourceEntity.getChildren().entrySet().size()); assertTrue(resourceEntity.getChildren().keySet().contains("rtt")); ResourceEntity<Tt> ttEntity = (ResourceEntity<Tt>) resourceEntity.getChildren().get("rtt"); assertTrue(ttEntity.isIdIncluded()); assertEquals(2, ttEntity.getAttributes().size()); assertTrue(ttEntity.getAttributes().containsKey("o")); assertTrue(ttEntity.getAttributes().containsKey("p")); assertTrue(ttEntity.getChildren().isEmpty()); }
@Override public ProcessorOutcome execute(SelectContext<?> context) { doExecute(context); return ProcessorOutcome.CONTINUE; }
CreateResourceEntityStage implements Processor<SelectContext<?>> { @Override public ProcessorOutcome execute(SelectContext<?> context) { doExecute(context); return ProcessorOutcome.CONTINUE; } }
CreateResourceEntityStage implements Processor<SelectContext<?>> { @Override public ProcessorOutcome execute(SelectContext<?> context) { doExecute(context); return ProcessorOutcome.CONTINUE; } CreateResourceEntityStage(
            @Inject IMetadataService metadataService,
            @Inject ICayenneExpMerger expMerger,
            @Inject ISortMerger sortMerger,
            @Inject IMapByMerger mapByMerger,
            @Inject ISizeMerger sizeMerger,
            @Inject IIncludeMerger includeMerger,
            @Inject IExcludeMerger excludeMerger); }
CreateResourceEntityStage implements Processor<SelectContext<?>> { @Override public ProcessorOutcome execute(SelectContext<?> context) { doExecute(context); return ProcessorOutcome.CONTINUE; } CreateResourceEntityStage(
            @Inject IMetadataService metadataService,
            @Inject ICayenneExpMerger expMerger,
            @Inject ISortMerger sortMerger,
            @Inject IMapByMerger mapByMerger,
            @Inject ISizeMerger sizeMerger,
            @Inject IIncludeMerger includeMerger,
            @Inject IExcludeMerger excludeMerger); @Override ProcessorOutcome execute(SelectContext<?> context); }
CreateResourceEntityStage implements Processor<SelectContext<?>> { @Override public ProcessorOutcome execute(SelectContext<?> context) { doExecute(context); return ProcessorOutcome.CONTINUE; } CreateResourceEntityStage(
            @Inject IMetadataService metadataService,
            @Inject ICayenneExpMerger expMerger,
            @Inject ISortMerger sortMerger,
            @Inject IMapByMerger mapByMerger,
            @Inject ISizeMerger sizeMerger,
            @Inject IIncludeMerger includeMerger,
            @Inject IExcludeMerger excludeMerger); @Override ProcessorOutcome execute(SelectContext<?> context);  }