Codota Logo
GeoSpatialIndexed
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
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

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • onCreateOptionsMenu (Activity)
  • orElseThrow (Optional)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now