Example usage for org.springframework.data.mongodb.core.mapping Location Location

List of usage examples for org.springframework.data.mongodb.core.mapping Location Location

Introduction

In this page you can find the example usage for org.springframework.data.mongodb.core.mapping Location Location.

Prototype

public Location(double[] latlong, int[] numbers, float[] amounts) 

Source Link

Usage

From source file:org.springframework.data.mongodb.core.mapping.MappingTests.java

@Test
public void testPrimitivesAndCustomCollectionName() {
    Location loc = new Location(new double[] { 1.0, 2.0 }, new int[] { 1, 2, 3, 4 },
            new float[] { 1.0f, 2.0f });
    template.insert(loc);//from   ww  w. j a v  a  2 s . co  m

    List<Location> result = template.find(new Query(Criteria.where("_id").is(loc.getId())), Location.class,
            "places");
    assertThat(result.size(), is(1));
}