Class OptionsBuilder

java.lang.Object
org.springframework.data.couchbase.core.query.OptionsBuilder

public class OptionsBuilder extends Object
  • Constructor Details

    • OptionsBuilder

      public OptionsBuilder()
  • Method Details

    • buildExistsOptions

      public static com.couchbase.client.java.kv.ExistsOptions buildExistsOptions(com.couchbase.client.java.kv.ExistsOptions options)
    • buildInsertOptions

      public static com.couchbase.client.java.kv.InsertOptions buildInsertOptions(com.couchbase.client.java.kv.InsertOptions options, com.couchbase.client.java.kv.PersistTo persistTo, com.couchbase.client.java.kv.ReplicateTo replicateTo, com.couchbase.client.core.msg.kv.DurabilityLevel durabilityLevel, Duration expiry, CouchbaseDocument doc)
    • buildUpsertOptions

      public static com.couchbase.client.java.kv.UpsertOptions buildUpsertOptions(com.couchbase.client.java.kv.UpsertOptions options, com.couchbase.client.java.kv.PersistTo persistTo, com.couchbase.client.java.kv.ReplicateTo replicateTo, com.couchbase.client.core.msg.kv.DurabilityLevel durabilityLevel, Duration expiry, CouchbaseDocument doc)
    • buildReplaceOptions

      public static com.couchbase.client.java.kv.ReplaceOptions buildReplaceOptions(com.couchbase.client.java.kv.ReplaceOptions options, com.couchbase.client.java.kv.PersistTo persistTo, com.couchbase.client.java.kv.ReplicateTo replicateTo, com.couchbase.client.core.msg.kv.DurabilityLevel durabilityLevel, Duration expiry, Long cas, CouchbaseDocument doc)
    • buildRemoveOptions

      public static com.couchbase.client.java.kv.RemoveOptions buildRemoveOptions(com.couchbase.client.java.kv.RemoveOptions options, com.couchbase.client.java.kv.PersistTo persistTo, com.couchbase.client.java.kv.ReplicateTo replicateTo, com.couchbase.client.core.msg.kv.DurabilityLevel durabilityLevel, Long cas)
    • getScopeFrom

      public static String getScopeFrom(Class<?> domainType)
      scope annotation could be a
      Parameters:
      domainType -
      Returns:
    • getCollectionFrom

      public static String getCollectionFrom(Class<?> domainType)
    • fromFirst

      public static <T> T fromFirst(T deflt, Object... choice)
      Get the most-specific
      Type Parameters:
      T -
      Parameters:
      deflt - the default value, which we treat as not set
      choice - array of values or Optional<values>, ordered from most to least specific
      Returns:
      the most specific choice
    • buildMeta

      public static Meta buildMeta(CouchbaseQueryMethod method, Class<?> typeToRead)
    • annotation

      public static <A extends Annotation, V> A annotation(Class<A> annotation, String attributeName, V defaultValue, AnnotatedElement... elements)
      return the first merged annotation which does not have attribute with null/defaultValue from the listed elements.
      Type Parameters:
      A -
      Parameters:
      annotation -
      attributeName -
      defaultValue -
      elements -
      Returns:
    • annotation

      public static <A extends Annotation, V> A annotation(Class<A> annotation, V defaultValue, AnnotatedElement[] elements)
    • annotationAttribute

      public static <A extends Annotation, V> V annotationAttribute(Class<A> annotation, String attributeName, V defaultValue, AnnotatedElement[] elements)
      return the first merged annotation which is not null/defaultValue from the listed elements.
      Type Parameters:
      A -
      Parameters:
      annotation -
      defaultValue -
      elements -
      Returns:
    • annotationString

      public static <A extends Annotation> String annotationString(Class<A> annotation, String attributeName, Object defaultValue, AnnotatedElement[] elements)
      return the toString() of the first merged annotation which is not null/defaultValue from the listed elements.
      Type Parameters:
      A -
      Parameters:
      annotation -
      defaultValue -
      elements -
      Returns:
    • annotationString

      public static <A extends Annotation> String annotationString(Class<A> annotation, Object defaultValue, AnnotatedElement[] elements)