@Test public void testSearchAttributesEqualsTraversalLimit() { long traversalLimit = 256L; try { traversalLimit = this.resourceRepository.getTraversalLimit(); assertThat(traversalLimit, equalTo(256L)); this.resourceRepository.setTraversalLimit(3); assertThat(this.resourceRepository.getTraversalLimit(), equalTo(3L)); ResourceEntity resource1 = persist3LevelRandomResourcetoZone1(); ResourceEntity actualResource = this.resourceRepository .getResourceWithInheritedAttributes(TEST_ZONE_1, resource1.getResourceIdentifier()); assertThat(actualResource.getAttributes().size(), equalTo(3)); } finally { this.resourceRepository.setTraversalLimit(traversalLimit); assertThat(this.resourceRepository.getTraversalLimit(), equalTo(256L)); } }
@Override public ResourceEntity getResourceWithInheritedAttributes(final ZoneEntity zone, final String resourceIdentifier) { return getEntityWithInheritedAttributes(zone, resourceIdentifier, Collections.emptySet()); }
GraphResourceRepository extends GraphGenericRepository<ResourceEntity> implements ResourceRepository, ResourceHierarchicalRepository { @Override public ResourceEntity getResourceWithInheritedAttributes(final ZoneEntity zone, final String resourceIdentifier) { return getEntityWithInheritedAttributes(zone, resourceIdentifier, Collections.emptySet()); } }
GraphResourceRepository extends GraphGenericRepository<ResourceEntity> implements ResourceRepository, ResourceHierarchicalRepository { @Override public ResourceEntity getResourceWithInheritedAttributes(final ZoneEntity zone, final String resourceIdentifier) { return getEntityWithInheritedAttributes(zone, resourceIdentifier, Collections.emptySet()); }  }
GraphResourceRepository extends GraphGenericRepository<ResourceEntity> implements ResourceRepository, ResourceHierarchicalRepository { @Override public ResourceEntity getResourceWithInheritedAttributes(final ZoneEntity zone, final String resourceIdentifier) { return getEntityWithInheritedAttributes(zone, resourceIdentifier, Collections.emptySet()); }  @Override ResourceEntity getByZoneAndResourceIdentifier(final ZoneEntity zone, final String resourceIdentifier); @Override ResourceEntity getResourceWithInheritedAttributes(final ZoneEntity zone, final String resourceIdentifier); @Override Set<String> getResourceEntityAndDescendantsIds(final ResourceEntity entity); @Override List<S> findAll(final Example<S> example); @Override List<S> findAll(final Example<S> example, final Sort sort); @Override S findOne(final Example<S> example); @Override Page<S> findAll(final Example<S> example, final Pageable pageable); @Override long count(final Example<S> example); @Override boolean exists(final Example<S> example); }
GraphResourceRepository extends GraphGenericRepository<ResourceEntity> implements ResourceRepository, ResourceHierarchicalRepository { @Override public ResourceEntity getResourceWithInheritedAttributes(final ZoneEntity zone, final String resourceIdentifier) { return getEntityWithInheritedAttributes(zone, resourceIdentifier, Collections.emptySet()); }  @Override ResourceEntity getByZoneAndResourceIdentifier(final ZoneEntity zone, final String resourceIdentifier); @Override ResourceEntity getResourceWithInheritedAttributes(final ZoneEntity zone, final String resourceIdentifier); @Override Set<String> getResourceEntityAndDescendantsIds(final ResourceEntity entity); @Override List<S> findAll(final Example<S> example); @Override List<S> findAll(final Example<S> example, final Sort sort); @Override S findOne(final Example<S> example); @Override Page<S> findAll(final Example<S> example, final Pageable pageable); @Override long count(final Example<S> example); @Override boolean exists(final Example<S> example); static final String RESOURCE_LABEL; static final String RESOURCE_ID_KEY; }