Package org.springframework.data.mapping.context.AbstractMappingContext.PersistentPropertyFilter

Examples of org.springframework.data.mapping.context.AbstractMappingContext.PersistentPropertyFilter.PropertyMatch.matches()


  @Test
  public void matchesFieldByConcreteNameAndType() throws Exception {

    PropertyMatch match = new PropertyMatch("name", "java.lang.String");
    assertThat(match.matches("this$0", Object.class), is(false));
    assertThat(match.matches("this$1", Object.class), is(false));
    assertThat(match.matches("name", String.class), is(true));
  }

  @Test
View Full Code Here


  @Test
  public void matchesFieldByConcreteNameAndType() throws Exception {

    PropertyMatch match = new PropertyMatch("name", "java.lang.String");
    assertThat(match.matches("this$0", Object.class), is(false));
    assertThat(match.matches("this$1", Object.class), is(false));
    assertThat(match.matches("name", String.class), is(true));
  }

  @Test
  public void matchesFieldByNamePattern() throws Exception {
View Full Code Here

  public void matchesFieldByConcreteNameAndType() throws Exception {

    PropertyMatch match = new PropertyMatch("name", "java.lang.String");
    assertThat(match.matches("this$0", Object.class), is(false));
    assertThat(match.matches("this$1", Object.class), is(false));
    assertThat(match.matches("name", String.class), is(true));
  }

  @Test
  public void matchesFieldByNamePattern() throws Exception {
View Full Code Here

  @Test
  public void matchesFieldByNamePattern() throws Exception {

    PropertyMatch match = new PropertyMatch("this\\$.*", "java.lang.Object");
    assertThat(match.matches("this$0", Object.class), is(true));
    assertThat(match.matches("this$1", Object.class), is(true));
    assertThat(match.matches("name", String.class), is(false));
  }

  @Test
View Full Code Here

  @Test
  public void matchesFieldByNamePattern() throws Exception {

    PropertyMatch match = new PropertyMatch("this\\$.*", "java.lang.Object");
    assertThat(match.matches("this$0", Object.class), is(true));
    assertThat(match.matches("this$1", Object.class), is(true));
    assertThat(match.matches("name", String.class), is(false));
  }

  @Test
  public void matchesFieldByNameOnly() throws Exception {
View Full Code Here

  public void matchesFieldByNamePattern() throws Exception {

    PropertyMatch match = new PropertyMatch("this\\$.*", "java.lang.Object");
    assertThat(match.matches("this$0", Object.class), is(true));
    assertThat(match.matches("this$1", Object.class), is(true));
    assertThat(match.matches("name", String.class), is(false));
  }

  @Test
  public void matchesFieldByNameOnly() throws Exception {

View Full Code Here

  @Test
  public void matchesFieldByNameOnly() throws Exception {

    PropertyMatch match = new PropertyMatch("this\\$.*", null);
    assertThat(match.matches("this$0", Object.class), is(true));
    assertThat(match.matches("this$1", Object.class), is(true));
    assertThat(match.matches("name", String.class), is(false));
  }

  @Test
View Full Code Here

  @Test
  public void matchesFieldByNameOnly() throws Exception {

    PropertyMatch match = new PropertyMatch("this\\$.*", null);
    assertThat(match.matches("this$0", Object.class), is(true));
    assertThat(match.matches("this$1", Object.class), is(true));
    assertThat(match.matches("name", String.class), is(false));
  }

  @Test
  public void matchesFieldByTypeNameOnly() throws Exception {
View Full Code Here

  public void matchesFieldByNameOnly() throws Exception {

    PropertyMatch match = new PropertyMatch("this\\$.*", null);
    assertThat(match.matches("this$0", Object.class), is(true));
    assertThat(match.matches("this$1", Object.class), is(true));
    assertThat(match.matches("name", String.class), is(false));
  }

  @Test
  public void matchesFieldByTypeNameOnly() throws Exception {

View Full Code Here

  @Test
  public void matchesFieldByTypeNameOnly() throws Exception {

    PropertyMatch match = new PropertyMatch(null, "java.lang.Object");
    assertThat(match.matches("this$0", Object.class), is(true));
    assertThat(match.matches("this$1", Object.class), is(true));
    assertThat(match.matches("name", String.class), is(false));
  }

  static class Sample {
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.