Package org.springframework.data.mongodb.core.geo

Examples of org.springframework.data.mongodb.core.geo.Distance


     repo.save( new Location("D�sseldorf", 6.810036, 51.224088 ) );    
   }

  @Test public void shouldFindSelf() {
    // when
    List<Location> locations = repo.findByPositionNear(DUS , new Distance(1, Metrics.KILOMETERS) );

    // then
    assertLocations(locations, "D�sseldorf");
  }
View Full Code Here


    assertLocations(locations, "D�sseldorf");
  }
 
  @Test public void shouldFindCologne() {
    // when
    List<Location> locations = repo.findByPositionNear(DUS , new Distance(70, Metrics.KILOMETERS) );

    // then
    assertLocations(locations, "D�sseldorf", "Cologne");
  }
View Full Code Here

    assertLocations(locations, "D�sseldorf", "Cologne");
  }

  @Test public void shouldFindCologneAndBerlin() {
    // when
    List<Location> locations = repo.findByPositionNear(DUS , new Distance(350, Metrics.MILES) );

    // then
    assertLocations(locations, "D�sseldorf", "Cologne", "Berlin");
  }
View Full Code Here

TOP

Related Classes of org.springframework.data.mongodb.core.geo.Distance

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.