Class OptionsBuilder
java.lang.Object
org.springframework.data.couchbase.core.query.OptionsBuilder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <A extends Annotation,
V>
Aannotation
(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.static <A extends Annotation,
V>
Aannotation
(Class<A> annotation, V defaultValue, AnnotatedElement[] elements) static <A extends Annotation,
V>
VannotationAttribute
(Class<A> annotation, String attributeName, V defaultValue, AnnotatedElement[] elements) return the first merged annotation which is not null/defaultValue from the listed elements.static <A extends Annotation>
StringannotationString
(Class<A> annotation, Object defaultValue, AnnotatedElement[] elements) static <A extends Annotation>
StringannotationString
(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.static com.couchbase.client.java.kv.ExistsOptions
buildExistsOptions
(com.couchbase.client.java.kv.ExistsOptions options) 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) static Meta
buildMeta
(CouchbaseQueryMethod method, Class<?> typeToRead) 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) 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) 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) static <T> T
Get the most-specificstatic String
getCollectionFrom
(Class<?> domainType) static String
getScopeFrom
(Class<?> domainType) scope annotation could be a
-
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
scope annotation could be a- Parameters:
domainType
-- Returns:
-
getCollectionFrom
-
fromFirst
Get the most-specific- Type Parameters:
T
-- Parameters:
deflt
- the default value, which we treat as not setchoice
- array of values or Optional<values>, ordered from most to least specific- Returns:
- the most specific choice
-
buildMeta
-
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)
-