Package org.springframework.data.mongodb.core

Examples of org.springframework.data.mongodb.core.Venue


    addVenues();
  }

  private void addVenues() {

    template.insert(new Venue("Penn Station", -73.99408, 40.75057));
    template.insert(new Venue("10gen Office", -73.99171, 40.738868));
    template.insert(new Venue("Flatiron Building", -73.988135, 40.741404));
    template.insert(new Venue("Players Club", -73.997812, 40.739128));
    template.insert(new Venue("City Bakery ", -73.992491, 40.738673));
    template.insert(new Venue("Splash Bar", -73.992491, 40.738673));
    template.insert(new Venue("Momofuku Milk Bar", -73.985839, 40.731698));
    template.insert(new Venue("Shake Shack", -73.98820, 40.74164));
    template.insert(new Venue("Penn Station", -73.99408, 40.75057));
    template.insert(new Venue("Empire State Building", -73.98602, 40.74894));
    // template.insert(new Venue("Washington Square Park", -73.99756, 40.73083));
    template.insert(new Venue("Ulaanbaatar, Mongolia", 106.9154, 47.9245));
    template.insert(new Venue("Maplewood, NJ", -74.2713, 40.73137));
  }
View Full Code Here


  }

  @Test
  public void searchAllData() {

    Venue foundVenue = template.findOne(query(where("name").is("Penn Station")), Venue.class);
    assertThat(foundVenue, is(notNullValue()));

    List<Venue> venues = template.findAll(Venue.class);
    assertThat(venues.size(), is(12));
View Full Code Here

TOP

Related Classes of org.springframework.data.mongodb.core.Venue

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.