Fix javadoc. (#1283)
Closes #1282. Co-authored-by: mikereiche <michael.reiche@couchbase.com>
This commit is contained in:
@@ -64,7 +64,7 @@ public class CouchbaseCacheConfiguration {
|
||||
* <ul>
|
||||
* <li>{@link String} to {@link byte byte[]} using UTF-8 encoding.</li>
|
||||
* <li>{@link SimpleKey} to {@link String}</li>
|
||||
*
|
||||
* </ul>
|
||||
* @param registry must not be {@literal null}.
|
||||
*/
|
||||
public static void registerDefaultConverters(final ConverterRegistry registry) {
|
||||
|
||||
@@ -228,7 +228,7 @@ public class CouchbaseCacheManager extends AbstractTransactionSupportingCacheMan
|
||||
|
||||
/**
|
||||
* Disable in-flight {@link org.springframework.cache.Cache} creation for unconfigured caches.
|
||||
* <p />
|
||||
* <p>
|
||||
* {@link CouchbaseCacheManager#getMissingCache(String)} returns {@literal null} for any unconfigured
|
||||
* {@link org.springframework.cache.Cache} instead of a new {@link CouchbaseCache} instance. This allows eg.
|
||||
* {@link org.springframework.cache.support.CompositeCacheManager} to chime in.
|
||||
|
||||
@@ -254,8 +254,6 @@ public abstract class AbstractCouchbaseConfiguration {
|
||||
|
||||
/**
|
||||
* Creates a {@link MappingCouchbaseConverter} using the configured {@link #couchbaseMappingContext}.
|
||||
*
|
||||
* @throws Exception on Bean construction failure.
|
||||
*/
|
||||
@Bean
|
||||
public MappingCouchbaseConverter mappingCouchbaseConverter(CouchbaseMappingContext couchbaseMappingContext,
|
||||
@@ -283,7 +281,6 @@ public abstract class AbstractCouchbaseConfiguration {
|
||||
/**
|
||||
* Creates a {@link CouchbaseMappingContext} equipped with entity classes scanned from the mapping base package.
|
||||
*
|
||||
* @throws Exception on Bean construction failure.
|
||||
*/
|
||||
@Bean
|
||||
public CouchbaseMappingContext couchbaseMappingContext(CustomConversions customConversions) throws Exception {
|
||||
@@ -299,7 +296,6 @@ public abstract class AbstractCouchbaseConfiguration {
|
||||
/**
|
||||
* Creates a {@link ObjectMapper} for the jsonSerializer of the ClusterEnvironment
|
||||
*
|
||||
* @throws Exception on Bean construction failure.
|
||||
* @return ObjectMapper
|
||||
*/
|
||||
|
||||
@@ -337,11 +333,9 @@ public abstract class AbstractCouchbaseConfiguration {
|
||||
/**
|
||||
* Return the base package to scan for mapped {@link Document}s. Will return the package name of the configuration
|
||||
* class (the concrete class, not this one here) by default.
|
||||
* <p/>
|
||||
* <p>
|
||||
* So if you have a {@code com.acme.AppConfig} extending {@link AbstractCouchbaseConfiguration} the base package will
|
||||
* be considered {@code com.acme} unless the method is overridden to implement alternate behavior.
|
||||
* </p>
|
||||
*
|
||||
* @return the base package to scan for mapped {@link Document} classes or {@literal null} to not enable scanning for
|
||||
* entities.
|
||||
|
||||
@@ -33,7 +33,7 @@ import com.couchbase.client.core.error.*;
|
||||
|
||||
/**
|
||||
* Simple {@link PersistenceExceptionTranslator} for Couchbase.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Convert the given runtime exception to an appropriate exception from the {@code org.springframework.dao} hierarchy.
|
||||
* Return {@literal null} if no translation is appropriate: any other exception may have resulted from user code, and
|
||||
* should not be translated.
|
||||
|
||||
@@ -24,11 +24,9 @@ import org.springframework.data.mapping.model.SimpleTypeHolder;
|
||||
|
||||
/**
|
||||
* Value object to capture custom conversion.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Types that can be mapped directly onto JSON are considered simple ones, because they neither need deeper inspection
|
||||
* nor nested conversion.
|
||||
* </p>
|
||||
*
|
||||
* @author Michael Nitschinger
|
||||
* @author Oliver Gierke
|
||||
|
||||
@@ -20,11 +20,9 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* Value object to capture custom conversion.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Types that can be mapped directly onto JSON are considered simple ones, because they neither need deeper inspection
|
||||
* nor nested conversion.
|
||||
* </p>
|
||||
*
|
||||
* @author Michael Nitschinger
|
||||
* @author Oliver Gierke
|
||||
|
||||
@@ -816,7 +816,7 @@ public class MappingCouchbaseConverter extends AbstractCouchbaseConverter implem
|
||||
/**
|
||||
* COPIED Set the {@link EntityCallbacks} instance to use when invoking
|
||||
* {@link org.springframework.data.mapping.callback.EntityCallback callbacks} like the {@link AfterConvertCallback}.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Overrides potentially existing {@link EntityCallbacks}.
|
||||
*
|
||||
* @param entityCallbacks must not be {@literal null}.
|
||||
|
||||
@@ -32,11 +32,9 @@ import com.couchbase.client.core.deps.com.fasterxml.jackson.annotation.JsonPrope
|
||||
|
||||
/**
|
||||
* Implements annotated property representations of a given {@link Field} instance.
|
||||
* <p/>
|
||||
* <p>
|
||||
* This object is used to gather information out of properties on objects that need to be persisted. For example, it
|
||||
* supports overriding of the actual property name by providing custom annotations.
|
||||
* </p>
|
||||
*
|
||||
* @author Michael Nitschinger
|
||||
* @author Mark Paluch
|
||||
@@ -71,7 +69,7 @@ public class BasicCouchbasePersistentProperty extends AnnotationBasedPersistentP
|
||||
|
||||
/**
|
||||
* Returns the field name of the property.
|
||||
* <p/>
|
||||
* <p>
|
||||
* The field name can be different from the actual property name by using a custom annotation.
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -23,18 +23,14 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* A {@link CouchbaseDocument} is an abstract representation of a document stored inside Couchbase Server.
|
||||
* <p/>
|
||||
* <p>
|
||||
* It acts like a {@link HashMap}, but only allows those types to be written that are supported by the underlying
|
||||
* storage format, which is currently JSON. Note that JSON conversion is not happening here, but performed at a
|
||||
* different stage based on the payload stored in the {@link CouchbaseDocument}.
|
||||
* </p>
|
||||
* <p/>
|
||||
* <p>
|
||||
* In addition to the actual content, meta data is also stored. This especially refers to the document ID and its
|
||||
* expiration time. Note that this information is not mandatory, since documents can be nested and therefore only the
|
||||
* topmost document most likely has an ID.
|
||||
* </p>
|
||||
*
|
||||
* @author Michael Nitschinger
|
||||
*/
|
||||
@@ -114,7 +110,7 @@ public class CouchbaseDocument implements CouchbaseStorable {
|
||||
|
||||
/**
|
||||
* Returns the current payload, including all recursive elements.
|
||||
* <p/>
|
||||
* <p>
|
||||
* It either returns the raw results or makes sure that the recusrive elements are also exported properly.
|
||||
*
|
||||
* @return
|
||||
@@ -187,10 +183,8 @@ public class CouchbaseDocument implements CouchbaseStorable {
|
||||
|
||||
/**
|
||||
* Returns the underlying payload.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Note that unlike {@link #export()}, the nested objects are not converted, so the "raw" map is returned.
|
||||
* </p>
|
||||
*
|
||||
* @return the underlying payload.
|
||||
*/
|
||||
@@ -221,7 +215,7 @@ public class CouchbaseDocument implements CouchbaseStorable {
|
||||
|
||||
/**
|
||||
* Returns the expiration time of the document.
|
||||
* <p/>
|
||||
* <p>
|
||||
* If the expiration time is 0, then the document will be persisted until deleted manually ("forever").
|
||||
*
|
||||
* @return the expiration time of the document.
|
||||
@@ -232,9 +226,9 @@ public class CouchbaseDocument implements CouchbaseStorable {
|
||||
|
||||
/**
|
||||
* Set the expiration time of the document.
|
||||
* <p/>
|
||||
* <p>
|
||||
* If the expiration time is 0, then the document will be persisted until deleted manually ("forever").
|
||||
* <p/>
|
||||
* <p>
|
||||
* Expiration should be expressed as seconds if <= 30 days (30 x 24 x 60 x 60 seconds), or as an expiry date (UTC,
|
||||
* UNIX time ie. seconds form the Epoch) if > 30 days.
|
||||
*
|
||||
|
||||
@@ -25,11 +25,9 @@ import org.springframework.data.mapping.model.SimpleTypeHolder;
|
||||
|
||||
/**
|
||||
* A {@link CouchbaseList} is an abstract list that represents an array stored in a (most of the times JSON) document.
|
||||
* <p/>
|
||||
* <p>
|
||||
* This {@link CouchbaseList} is part of the potentially nested structure inside one or more {@link CouchbaseDocument}s.
|
||||
* It can also contain them recursively, depending on how the document is modeled.
|
||||
* </p>
|
||||
*/
|
||||
public class CouchbaseList implements CouchbaseStorable {
|
||||
|
||||
@@ -145,7 +143,7 @@ public class CouchbaseList implements CouchbaseStorable {
|
||||
|
||||
/**
|
||||
* Returns the current payload, including all recursive elements.
|
||||
* <p/>
|
||||
* <p>
|
||||
* It either returns the raw results or makes sure that the recusrive elements are also exported properly.
|
||||
*
|
||||
* @return
|
||||
|
||||
@@ -34,7 +34,7 @@ public interface CouchbasePersistentEntity<T> extends PersistentEntity<T, Couchb
|
||||
|
||||
/**
|
||||
* Returns the expiration time of the entity.
|
||||
* <p/>
|
||||
* <p>
|
||||
* The Couchbase format for expiration time is: - for TTL < 31 days (<= 30 * 24 * 60 * 60): expressed as a TTL in
|
||||
* seconds - for TTL > 30 days: expressed as Unix UTC time of expiry (number of SECONDS since the Epoch)
|
||||
*
|
||||
@@ -45,7 +45,7 @@ public interface CouchbasePersistentEntity<T> extends PersistentEntity<T, Couchb
|
||||
|
||||
/**
|
||||
* Returns the expiration time of the entity.
|
||||
* <p/>
|
||||
* <p>
|
||||
* The Couchbase format for expiration time is: - for TTL < 31 days (<= 30 * 24 * 60 * 60): expressed as a TTL in
|
||||
* seconds - for TTL > 30 days: expressed as Unix UTC time of expiry (number of SECONDS since the Epoch)
|
||||
*
|
||||
|
||||
@@ -27,7 +27,7 @@ public interface CouchbasePersistentProperty extends PersistentProperty<Couchbas
|
||||
|
||||
/**
|
||||
* Returns the field name of the property.
|
||||
* <p/>
|
||||
* <p>
|
||||
* The field name can be different from the actual property name by using a custom annotation.
|
||||
*/
|
||||
String getFieldName();
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.springframework.data.couchbase.core.mapping;
|
||||
|
||||
/**
|
||||
* Marker Interface to identify either a {@link CouchbaseDocument} or a {@link CouchbaseList}.
|
||||
* <p/>
|
||||
* <p>
|
||||
* This interface will be extended in the future to refactor the needed infrastructure into the common interface.
|
||||
*
|
||||
* @author Michael Nitschinger
|
||||
|
||||
@@ -26,10 +26,10 @@ import org.springframework.data.couchbase.repository.CouchbaseRepository;
|
||||
/**
|
||||
* This annotation is targeted at {@link CouchbaseRepository Repository} interfaces, indicating that the framework
|
||||
* should ensure a N1QL Secondary Index is present when the repository is instantiated.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Said index will relate to the "type" field (the one bearing type information) and restrict on documents that match
|
||||
* the repository's entity class.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Be sure to also use {@link N1qlPrimaryIndexed} to make sure the PRIMARY INDEX is there as well.
|
||||
*
|
||||
* @author Simon Baslé
|
||||
|
||||
@@ -383,7 +383,6 @@ public class Query {
|
||||
* This will find annotations included in composed annotations as well. Ideally
|
||||
*
|
||||
* @param method representing the query.
|
||||
* @return the query with the annotations applied
|
||||
*/
|
||||
public void setMeta(CouchbaseQueryMethod method, Class<?> typeToRead) {
|
||||
meta = OptionsBuilder.buildMeta(method, typeToRead);
|
||||
|
||||
@@ -28,7 +28,7 @@ import com.couchbase.client.java.json.JsonValue;
|
||||
*
|
||||
* <pre>
|
||||
* @Query("#{#n1ql.selectEntity} where #{#n1ql.filter} and firstname = $1 and lastname = $2")
|
||||
* List<User> getByFirstnameAndLastname(String firstname, String lastname);
|
||||
* List<User> getByFirstnameAndLastname(String firstname, String lastname);
|
||||
* </pre>
|
||||
*
|
||||
* It must include the SELECT ... FROM ... preferably via the #n1ql expression, in addition to any predicates required,
|
||||
|
||||
@@ -26,10 +26,10 @@ import org.springframework.data.couchbase.repository.CouchbaseRepository;
|
||||
/**
|
||||
* This annotation is targeted at {@link CouchbaseRepository Repository} interfaces, indicating that the framework
|
||||
* should ensure a View is present when the repository is instantiated.
|
||||
* <p/>
|
||||
* <p>
|
||||
* The view must at least be described as a design document name and view name. Default map function will filter
|
||||
* documents on the type associated to the repository, and default reduce function is "_count".
|
||||
* <p/>
|
||||
* <p>
|
||||
* One can specify a custom reduce function as well as a non-default map function.
|
||||
*
|
||||
* @author Simon Baslé
|
||||
|
||||
@@ -30,7 +30,7 @@ import com.couchbase.client.java.query.QueryScanConsistency;
|
||||
/**
|
||||
* Annotation to set the scan consistency of N1QL queries with Couchbase. This controls whether couchbase waits for all
|
||||
* changes to be processed by an index or whether stale results are acceptable.
|
||||
* <p/>
|
||||
* <p>
|
||||
* If not set, the default consistency set in {@link AbstractCouchbaseConfiguration#getDefaultConsistency()} is used.
|
||||
*
|
||||
* @author Johannes Jasper.
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.springframework.data.couchbase.core.support;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* A common interface for those that support one(T), all(Collection<T>)
|
||||
* A common interface for those that support one(T), all(Collection<T>)
|
||||
*
|
||||
* @author Michael Reiche
|
||||
* @param <T> - the entity class
|
||||
|
||||
@@ -21,7 +21,7 @@ import reactor.core.publisher.Mono;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* A common interface for those that support one(T), all(Collection<T>)
|
||||
* A common interface for those that support one(T), all(Collection<T%gt;)
|
||||
*
|
||||
* @author Michael Reiche
|
||||
* @param <T> - the entity class
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* A common interface for those that support one(T), all(Collection<T>)
|
||||
* A common interface for those that support one(T), all(Collection<T>)
|
||||
*
|
||||
* @author Michael Reiche
|
||||
*
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.springframework.data.couchbase.core.support;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* A common interface for those that support one(T), all(Collection<T>)
|
||||
* A common interface for those that support one(T), all(Collection<T>)
|
||||
*
|
||||
* @author Michael Reiche
|
||||
*
|
||||
|
||||
@@ -21,7 +21,7 @@ import reactor.core.publisher.Mono;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* A common interface for those that support one(T), all(Collection<T>)
|
||||
* A common interface for those that support one(T), all(Collection<T>)
|
||||
*
|
||||
* @author Michael Reiche
|
||||
* @param <T> - the entity class
|
||||
|
||||
@@ -21,11 +21,9 @@ import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* A common interface for those that support one(T), all(Collection<T>)
|
||||
* A common interface for those that support one(T), all(Collection<T>)
|
||||
*
|
||||
* @author Michael Reiche
|
||||
*
|
||||
* @param <T> - the entity class
|
||||
*/
|
||||
public interface OneAndAllExists {
|
||||
boolean one(String id);
|
||||
|
||||
@@ -21,11 +21,10 @@ import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* A common interface for those that support one(T), all(Collection<T>)
|
||||
* A common interface for those that support one(T), all(Collection<T>)
|
||||
*
|
||||
* @author Michael Reiche
|
||||
*
|
||||
* @param <T> - the entity class
|
||||
*/
|
||||
public interface OneAndAllExistsReactive {
|
||||
Mono<Boolean> one(String id);
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.springframework.data.couchbase.core.support;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* A common interface for those that support one(String), all(Collection<String>)
|
||||
* A common interface for those that support one(String), all(Collection<String>)
|
||||
*
|
||||
* @author Michael Reiche
|
||||
*
|
||||
|
||||
@@ -21,7 +21,7 @@ import reactor.core.publisher.Mono;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* A common interface for those that support one(String), all(Collection<String>)
|
||||
* A common interface for those that support one(String), all(Collection<String>)
|
||||
*
|
||||
* @author Michael Reiche
|
||||
* @param <T> - the entity class
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* A common interface for those that support one(T), all(Collection<T>)
|
||||
* A common interface for those that support one(T), all(Collection<T>)
|
||||
*
|
||||
* @author Michael Reiche
|
||||
* @param <T> - the entity class
|
||||
|
||||
@@ -26,7 +26,7 @@ import com.couchbase.client.java.CommonOptions;
|
||||
/**
|
||||
* The generic parameter needs to be REPO which is either a CouchbaseRepository parameterized on T,ID or a
|
||||
* ReactiveCouchbaseRepository parameterized on T,ID. i.e.: interface AirportRepository extends
|
||||
* CouchbaseRepository<Airport, String>, DynamicProxyable<AirportRepository>
|
||||
* CouchbaseRepository<Airport, String>, DynamicProxyable<AirportRepository>
|
||||
*
|
||||
* @param <REPO>
|
||||
* @author Michael Reiche
|
||||
|
||||
@@ -23,23 +23,25 @@ import java.lang.annotation.Target;
|
||||
|
||||
import org.springframework.data.annotation.QueryAnnotation;
|
||||
import org.springframework.data.couchbase.core.CouchbaseTemplate;
|
||||
import org.springframework.data.couchbase.repository.query.StringBasedN1qlQueryParser;
|
||||
import org.springframework.data.couchbase.repository.query.StringN1qlQueryCreator;
|
||||
|
||||
/**
|
||||
* Annotation to support the use of N1QL queries with Couchbase.
|
||||
* <p/>
|
||||
* Annotation to support the use of N1QL queries with Couchbase. Queries are crated by {@link StringN1qlQueryCreator}
|
||||
* <p>
|
||||
* Using it without parameter will resolve the query from the method name. Providing a value (an inline N1QL statement)
|
||||
* will execute that statement instead.
|
||||
* <p/>
|
||||
* <p>
|
||||
* In this case, one can use a placeholder notation of {@code ?0}, {@code ?1} and so on.
|
||||
* <p/>
|
||||
* <p>
|
||||
* Also, SpEL in the form <code>#{spelExpression}</code> is supported, including the following N1QL variables that will
|
||||
* be replaced by the underlying {@link CouchbaseTemplate} associated information:
|
||||
* <ul>
|
||||
* <li>{@value StringN1qlBasedQuery#SPEL_SELECT_FROM_CLAUSE} (see {@link StringN1qlBasedQuery#SPEL_SELECT_FROM_CLAUSE})
|
||||
* <li>{@value StringBasedN1qlQueryParser#SPEL_SELECT_FROM_CLAUSE} (see {@link StringBasedN1qlQueryParser#SPEL_SELECT_FROM_CLAUSE})
|
||||
* </li>
|
||||
* <li>{@value StringN1qlBasedQuery#SPEL_BUCKET} (see {@link StringN1qlBasedQuery#SPEL_BUCKET})</li>
|
||||
* <li>{@value StringN1qlBasedQuery#SPEL_ENTITY} (see {@link StringN1qlBasedQuery#SPEL_ENTITY})</li>
|
||||
* <li>{@value StringN1qlBasedQuery#SPEL_FILTER} (see {@link StringN1qlBasedQuery#SPEL_FILTER})</li>
|
||||
* <li>{@value StringBasedN1qlQueryParser#SPEL_BUCKET} (see {@link StringBasedN1qlQueryParser#SPEL_BUCKET})</li>
|
||||
* <li>{@value StringBasedN1qlQueryParser#SPEL_ENTITY} (see {@link StringBasedN1qlQueryParser#SPEL_ENTITY})</li>
|
||||
* <li>{@value StringBasedN1qlQueryParser#SPEL_FILTER} (see {@link StringBasedN1qlQueryParser#SPEL_FILTER})</li>
|
||||
* </ul>
|
||||
*
|
||||
* @author Simon Baslé.
|
||||
|
||||
@@ -18,9 +18,9 @@ package org.springframework.data.couchbase.repository.query;
|
||||
|
||||
/**
|
||||
* An utility entity that allows to extract total row count out of a COUNT(*) N1QL query.
|
||||
* <p/>
|
||||
* <p>
|
||||
* The query should use the COUNT_ALIAS, eg.: SELECT COUNT(*) AS count FROM default;
|
||||
* <p/>
|
||||
* <p>
|
||||
* This ensures that the framework will be able to map the JSON result to this {@link CountFragment} class so that it
|
||||
* can be used.
|
||||
*/
|
||||
|
||||
@@ -75,7 +75,6 @@ import com.couchbase.client.java.json.JsonValue;
|
||||
* <ul>
|
||||
* <li><b>NEAR, WITHIN:</b> geospatial is not supported in N1QL as of now</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @author Simon Baslé
|
||||
* @author Subhashni Balakrishnan
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.data.couchbase.core.convert.CouchbaseConverter;
|
||||
import org.springframework.data.couchbase.core.mapping.CouchbasePersistentEntity;
|
||||
import org.springframework.data.couchbase.core.mapping.CouchbasePersistentProperty;
|
||||
import org.springframework.data.couchbase.core.mapping.Field;
|
||||
import org.springframework.data.couchbase.core.query.N1QLExpression;
|
||||
import org.springframework.data.couchbase.core.query.N1QLQuery;
|
||||
import org.springframework.data.couchbase.repository.query.CouchbaseEntityInformation;
|
||||
|
||||
Reference in New Issue
Block a user