congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
GeoSpatialIndexed
Code IndexAdd Tabnine to your IDE (free)

How to use
GeoSpatialIndexed
in
org.springframework.data.mongodb.core.index

Best Java code snippets using org.springframework.data.mongodb.core.index.GeoSpatialIndexed (Showing top 7 results out of 315)

origin: spring-projects/spring-data-examples

/**
 * @author Christoph Strobl
 */
@Data
public class Planet {

  final @Id String name;
  final @GeoSpatialIndexed Point coordinates;
}

origin: spring-projects/spring-data-mongodb

/**
 * Creates {@link IndexDefinition} wrapped in {@link IndexDefinitionHolder} out of {@link GeoSpatialIndexed} for
 * {@link MongoPersistentProperty}.
 *
 * @param dotPath The properties {@literal "dot"} path representation from its document root.
 * @param collection
 * @param persistentProperty
 * @return
 */
@Nullable
protected IndexDefinitionHolder createGeoSpatialIndexDefinition(String dotPath, String collection,
    MongoPersistentProperty persistentProperty) {
  GeoSpatialIndexed index = persistentProperty.findAnnotation(GeoSpatialIndexed.class);
  if (index == null) {
    return null;
  }
  GeospatialIndex indexDefinition = new GeospatialIndex(dotPath);
  indexDefinition.withBits(index.bits());
  indexDefinition.withMin(index.min()).withMax(index.max());
  if (!index.useGeneratedName()) {
    indexDefinition.named(pathAwareIndexName(index.name(), dotPath, persistentProperty));
  }
  indexDefinition.typed(index.type()).withBucketSize(index.bucketSize()).withAdditionalField(index.additionalField());
  return new IndexDefinitionHolder(dotPath, indexDefinition, collection);
}
origin: org.springframework.data/spring-data-mongodb

/**
 * Creates {@link IndexDefinition} wrapped in {@link IndexDefinitionHolder} out of {@link GeoSpatialIndexed} for
 * {@link MongoPersistentProperty}.
 *
 * @param dotPath The properties {@literal "dot"} path representation from its document root.
 * @param collection
 * @param persistentProperty
 * @return
 */
@Nullable
protected IndexDefinitionHolder createGeoSpatialIndexDefinition(String dotPath, String collection,
    MongoPersistentProperty persistentProperty) {
  GeoSpatialIndexed index = persistentProperty.findAnnotation(GeoSpatialIndexed.class);
  if (index == null) {
    return null;
  }
  GeospatialIndex indexDefinition = new GeospatialIndex(dotPath);
  indexDefinition.withBits(index.bits());
  indexDefinition.withMin(index.min()).withMax(index.max());
  if (!index.useGeneratedName()) {
    indexDefinition.named(pathAwareIndexName(index.name(), dotPath, persistentProperty));
  }
  indexDefinition.typed(index.type()).withBucketSize(index.bucketSize()).withAdditionalField(index.additionalField());
  return new IndexDefinitionHolder(dotPath, indexDefinition, collection);
}
origin: spring-projects/spring-data-examples

  /**
   * Value object to represent an {@link Address}.
   *
   * @author Oliver Gierke
   */
  @Value
  public static class Address {

    String street, city, zip;
    @GeoSpatialIndexed(type = GEO_2DSPHERE) Point location;

    /*
     * (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    public String toString() {
      return String.format("%s, %s %s", street, zip, city);
    }
  }
}
origin: odrotbohm/rest-microservices

  @Value
  public static class Address {

    String street, city, zip;
    @GeoSpatialIndexed(type = GeoSpatialIndexType.GEO_2DSPHERE) Point location;
  }
}
origin: spring-cloud-samples/customers-stores

/**
 * Value object to represent an {@link Address}.
 * 
 * @author Oliver Gierke
 */
@Value
public class Address {

  private final String street, city, zip;
  private final @GeoSpatialIndexed Point location;
}

origin: FunkyARUI/Real-time-Running-System

@JsonIgnore
private final
@GeoSpatialIndexed
Point location;
private String state;
org.springframework.data.mongodb.core.indexGeoSpatialIndexed

Most used methods

  • <init>
  • additionalField
  • bits
  • bucketSize
  • max
  • min
  • name
  • type
  • useGeneratedName

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSystemService (Context)
  • getApplicationContext (Context)
  • getSupportFragmentManager (FragmentActivity)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now