@Test public void testIdAndAttributes() { ConstraintsBuilder<T> tc = Constraint.idAndAttributes(T.class); ConstrainedAgEntity<T> result = tc.apply(entity); assertNotNull(result); assertEquals(3, result.getAttributes().size()); assertTrue(result.getChildren().isEmpty()); assertTrue(result.isIdIncluded()); }
@Override public ConstrainedAgEntity<T> apply(AgEntity<T> agEntity) { return op.apply(new ConstrainedAgEntity<T>(agEntity)); }
ConstraintsBuilder implements Constraint<T> { @Override public ConstrainedAgEntity<T> apply(AgEntity<T> agEntity) { return op.apply(new ConstrainedAgEntity<T>(agEntity)); } }
ConstraintsBuilder implements Constraint<T> { @Override public ConstrainedAgEntity<T> apply(AgEntity<T> agEntity) { return op.apply(new ConstrainedAgEntity<T>(agEntity)); } protected  ConstraintsBuilder(Function<ConstrainedAgEntity<T>, ConstrainedAgEntity<T>> op); }
ConstraintsBuilder implements Constraint<T> { @Override public ConstrainedAgEntity<T> apply(AgEntity<T> agEntity) { return op.apply(new ConstrainedAgEntity<T>(agEntity)); } protected  ConstraintsBuilder(Function<ConstrainedAgEntity<T>, ConstrainedAgEntity<T>> op); @Override ConstrainedAgEntity<T> apply(AgEntity<T> agEntity); ConstraintsBuilder<T> excludeProperty(String attributeOrRelationship); ConstraintsBuilder<T> excludeProperties(String... attributesOrRelationships); ConstraintsBuilder<T> excludeAllAttributes(); ConstraintsBuilder<T> excludeAllChildren(); ConstraintsBuilder<T> attribute(String attribute); ConstraintsBuilder<T> allAttributes(); ConstraintsBuilder<T> attributes(String... attributes); ConstraintsBuilder<T> includeId(boolean include); ConstraintsBuilder<T> includeId(); ConstraintsBuilder<T> excludeId(); ConstraintsBuilder<T> and(Expression qualifier); ConstraintsBuilder<T> or(Expression qualifier); ConstraintsBuilder<T> path(String path, ConstraintsBuilder<S> subEntityBuilder); }
ConstraintsBuilder implements Constraint<T> { @Override public ConstrainedAgEntity<T> apply(AgEntity<T> agEntity) { return op.apply(new ConstrainedAgEntity<T>(agEntity)); } protected  ConstraintsBuilder(Function<ConstrainedAgEntity<T>, ConstrainedAgEntity<T>> op); @Override ConstrainedAgEntity<T> apply(AgEntity<T> agEntity); ConstraintsBuilder<T> excludeProperty(String attributeOrRelationship); ConstraintsBuilder<T> excludeProperties(String... attributesOrRelationships); ConstraintsBuilder<T> excludeAllAttributes(); ConstraintsBuilder<T> excludeAllChildren(); ConstraintsBuilder<T> attribute(String attribute); ConstraintsBuilder<T> allAttributes(); ConstraintsBuilder<T> attributes(String... attributes); ConstraintsBuilder<T> includeId(boolean include); ConstraintsBuilder<T> includeId(); ConstraintsBuilder<T> excludeId(); ConstraintsBuilder<T> and(Expression qualifier); ConstraintsBuilder<T> or(Expression qualifier); ConstraintsBuilder<T> path(String path, ConstraintsBuilder<S> subEntityBuilder);  }