Package org.springframework.data.mapping.context

Examples of org.springframework.data.mapping.context.SamplePersistentProperty


   * @see DATACMNS-282
   */
  @Test
  public void populatesAnnotationCacheWithDirectAnnotationsOnCreation() {

    SamplePersistentProperty property = entity.getPersistentProperty("meta");

    // Assert direct annotations are cached on construction
    Map<Class<? extends Annotation>, Annotation> cache = getAnnotationCache(property);
    assertThat(cache.containsKey(MyAnnotationAsMeta.class), is(true));
    assertThat(cache.containsKey(MyAnnotation.class), is(false));

    // Assert meta annotation is found and cached
    MyAnnotation annotation = property.findAnnotation(MyAnnotation.class);
    assertThat(annotation, is(notNullValue()));
    assertThat(cache.containsKey(MyAnnotation.class), is(true));
  }
View Full Code Here

TOP

Related Classes of org.springframework.data.mapping.context.SamplePersistentProperty

Copyright © 2018 www.massapicom. 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.