Examples of EntityGraph


Examples of org.glassfish.jersey.message.filtering.spi.EntityGraph

        }
    }

    @Test
    public void testProcessRolesAllowedAccessor() throws Exception {
        final EntityGraph actual = new EntityGraphImpl(RolesAllowedEntity.class);
        final EntityGraph expected = new EntityGraphImpl(RolesAllowedEntity.class);

        for (final boolean forWriter : new boolean[] {true, false}) {
            final EntityProcessor.Result result = testProcessAccessor(RolesAllowedEntity.class, actual, forWriter);

            if (forWriter) {
                expected.addSubgraph("subgraph", SubEntity.class, SecurityHelper.getRolesAllowedScope("manager"));
            } else {
                expected.addSubgraph("subgraph", SubEntity.class, SecurityHelper.getRolesAllowedScope("client"));
            }

            assertThat(result, equalTo(EntityProcessor.Result.APPLY));
            assertThat(actual, equalTo(expected));
        }
View Full Code Here

Examples of org.springframework.data.jpa.repository.EntityGraph

      this.entityGraph = findEntityGraph(method);
    }

    private static final JpaEntityGraph findEntityGraph(Method method) {

      EntityGraph entityGraphAnnotation = AnnotationUtils.findAnnotation(method, EntityGraph.class);
      return entityGraphAnnotation == null ? null : new JpaEntityGraph(entityGraphAnnotation.value(),
          entityGraphAnnotation.type());
    }
View Full Code Here

Examples of org.springframework.data.jpa.repository.EntityGraph

   * @return
   * @since 1.6
   */
  JpaEntityGraph getEntityGraph() {

    EntityGraph annotation = findAnnotation(method, EntityGraph.class);
    return annotation == null ? null : new JpaEntityGraph(annotation.value(), annotation.type());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.