-
Notifications
You must be signed in to change notification settings - Fork 192
Scope and collection API for template. #1133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
c008466
DATACOUCH-1055 - Queries on field annotated properties have original …
mikereiche 46072dc
Scope and Collection API for template.
mikereiche 36de313
Add override of toN1qlRemoveString() to StringQuery. (#1135)
mikereiche a806631
Expose ObjectMapper used by JsonSerializer (#1132)
mikereiche c814a10
Update CI to JDK 16.
gregturn 3cce0b3
Updated changelog.
mp911de 5cf142d
Updated changelog.
mp911de da5eebe
DATACOUCH-1055 - Queries on field annotated properties have original …
mikereiche 0d1d779
Scope and Collection API for template.
mikereiche 2349784
Merge branch 'datacouch_963_scope_and_collection_api_main' of github.…
mikereiche 5b1402d
Merge branch 'datacouch_963_scope_and_collection_api_main' of github.…
mikereiche b4b9b10
Merge branch 'datacouch_963_scope_and_collection_api_main' of github.…
mikereiche 7d85b55
Merge branch 'datacouch_963_scope_and_collection_api_main' of github.…
mikereiche 56b984b
Merge branch 'datacouch_963_scope_and_collection_api_main' of github.…
mikereiche 3db9e30
Merge branch 'datacouch_963_scope_and_collection_api_main' of github.…
mikereiche ef59886
Merge branch 'datacouch_963_scope_and_collection_api_main' of github.…
mikereiche File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2012-2020 the original author or authors | ||
* Copyright 2012-2021 the original author or authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
|
@@ -18,16 +18,29 @@ | |
import java.util.Collection; | ||
import java.util.Map; | ||
|
||
import org.springframework.data.couchbase.core.support.InCollection; | ||
import org.springframework.data.couchbase.core.support.InScope; | ||
import org.springframework.data.couchbase.core.support.OneAndAllExists; | ||
import org.springframework.data.couchbase.core.support.WithCollection; | ||
import org.springframework.data.couchbase.core.support.WithExistsOptions; | ||
|
||
import com.couchbase.client.java.kv.ExistsOptions; | ||
|
||
/** | ||
* Insert Operations | ||
* | ||
* @author Christoph Strobl | ||
* @since 2.0 | ||
*/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm just adding javadoc that was missing. As near as I can figure, the original author was Christoph |
||
public interface ExecutableExistsByIdOperation { | ||
|
||
/** | ||
* Checks if the document exists in the bucket. | ||
*/ | ||
ExecutableExistsById existsById(); | ||
|
||
/** | ||
* Terminating operations invoking the actual execution. | ||
*/ | ||
interface TerminatingExistsById extends OneAndAllExists { | ||
|
||
/** | ||
|
@@ -36,6 +49,7 @@ interface TerminatingExistsById extends OneAndAllExists { | |
* @param id the ID to perform the operation on. | ||
* @return true if the document exists, false otherwise. | ||
*/ | ||
@Override | ||
boolean one(String id); | ||
|
||
/** | ||
|
@@ -44,20 +58,59 @@ interface TerminatingExistsById extends OneAndAllExists { | |
* @param ids the ids to check. | ||
* @return a map consisting of the document IDs as the keys and if they exist as the value. | ||
*/ | ||
@Override | ||
Map<String, Boolean> all(Collection<String> ids); | ||
} | ||
|
||
/** | ||
* Fluent method to specify options. | ||
* | ||
* @param <T> the entity type to use for the results. | ||
*/ | ||
interface ExistsByIdWithOptions<T> extends TerminatingExistsById, WithExistsOptions<T> { | ||
/** | ||
* Fluent method to specify options to use for execution | ||
* | ||
* @param options options to use for execution | ||
*/ | ||
@Override | ||
TerminatingExistsById withOptions(ExistsOptions options); | ||
} | ||
|
||
interface ExistsByIdWithCollection extends TerminatingExistsById, WithCollection { | ||
/** | ||
* | ||
* Fluent method to specify the collection. | ||
* | ||
* @param <T> the entity type to use for the results. | ||
*/ | ||
interface ExistsByIdInCollection<T> extends ExistsByIdWithOptions<T>, InCollection<T> { | ||
/** | ||
* With a different collection | ||
* | ||
* @param collection the collection to use. | ||
*/ | ||
@Override | ||
ExistsByIdWithOptions<T> inCollection(String collection); | ||
} | ||
|
||
/** | ||
* Fluent method to specify the scope. | ||
* | ||
* @param <T> the entity type to use for the results. | ||
*/ | ||
interface ExistsByIdInScope<T> extends ExistsByIdInCollection<T>, InScope<T> { | ||
/** | ||
* Allows to specify a different collection than the default one configured. | ||
* With a different scope | ||
* | ||
* @param collection the collection to use in this scope. | ||
* @param scope the scope to use. | ||
*/ | ||
TerminatingExistsById inCollection(String collection); | ||
@Override | ||
ExistsByIdInCollection<T> inScope(String scope); | ||
} | ||
|
||
interface ExecutableExistsById extends ExistsByIdWithCollection {} | ||
/** | ||
* Provides methods for constructing KV exists operations in a fluent way. | ||
*/ | ||
interface ExecutableExistsById extends ExistsByIdInScope {} | ||
|
||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just formatting changes