Examples of toDotPath()


Examples of org.springframework.data.mapping.PropertyPath.toDotPath()

  @SuppressWarnings("rawtypes")
  public void parsesSimplePropertyCorrectly() throws Exception {

    PropertyPath reference = PropertyPath.from("userName", Foo.class);
    assertThat(reference.hasNext(), is(false));
    assertThat(reference.toDotPath(), is("userName"));
    assertThat(reference.getOwningType(), is((TypeInformation) ClassTypeInformation.from(Foo.class)));
  }

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

Examples of org.springframework.data.mapping.PropertyPath.toDotPath()

  public void parsesPathPropertyCorrectly() throws Exception {

    PropertyPath reference = PropertyPath.from("userName", Bar.class);
    assertThat(reference.hasNext(), is(true));
    assertThat(reference.next(), is(new PropertyPath("name", FooBar.class)));
    assertThat(reference.toDotPath(), is("user.name"));
  }

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

Examples of org.springframework.data.mapping.PropertyPath.toDotPath()

  @Test
  public void prefersLongerMatches() throws Exception {

    PropertyPath reference = PropertyPath.from("userName", Sample.class);
    assertThat(reference.hasNext(), is(false));
    assertThat(reference.toDotPath(), is("userName"));
  }

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

Examples of org.springframework.data.mapping.PropertyPath.toDotPath()

    PropertyPath propertyPath = PropertyPath.from("_foo", Sample2.class);
    assertThat(propertyPath.getSegment(), is("_foo"));
    assertThat(propertyPath.getType(), is(typeCompatibleWith(Foo.class)));

    propertyPath = PropertyPath.from("_foo__email", Sample2.class);
    assertThat(propertyPath.toDotPath(), is("_foo._email"));
  }

  @Test
  public void supportsDotNotationAsWell() {
View Full Code Here

Examples of org.springframework.data.mapping.PropertyPath.toDotPath()

    if (null == domainClass) {
      return new Order(direction, StringUtils.uncapitalize(propertySource));
    }
    PropertyPath propertyPath = PropertyPath.from(propertySource, domainClass);
    return new Order(direction, propertyPath.toDotPath());
  }

  /**
   * Returns the clause as {@link Sort}.
   *
 
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.