DATACASS-652 - Polishing.
Annotate our annotations consistently with Documented.
This commit is contained in:
@@ -16,8 +16,10 @@
|
||||
package org.springframework.data.cassandra.core.mapping;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import com.datastax.driver.core.DataType;
|
||||
|
||||
@@ -31,6 +33,8 @@ import com.datastax.driver.core.DataType;
|
||||
*/
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(value = { ElementType.TYPE, ElementType.TYPE_PARAMETER, ElementType.ANNOTATION_TYPE, ElementType.FIELD,
|
||||
ElementType.METHOD, ElementType.PARAMETER })
|
||||
public @interface CassandraType {
|
||||
|
||||
/**
|
||||
@@ -39,14 +43,14 @@ public @interface CassandraType {
|
||||
DataType.Name type();
|
||||
|
||||
/**
|
||||
* If the property is {@link java.util.Collection Collection-like}, then this attribute holds
|
||||
* a single {@link DataType.Name DataType Name} representing the element type of the {@link java.util.Collection}.
|
||||
* If the property is {@link java.util.Collection Collection-like}, then this attribute holds a single
|
||||
* {@link DataType.Name DataType Name} representing the element type of the {@link java.util.Collection}.
|
||||
* <p/>
|
||||
* If the property is a {@link java.util.Map}, then this attribute holds exactly
|
||||
* two {@link DataType.Name DataType Names}; the first is the key type and the second is the value type.
|
||||
* If the property is a {@link java.util.Map}, then this attribute holds exactly two {@link DataType.Name DataType
|
||||
* Names}; the first is the key type and the second is the value type.
|
||||
* <p/>
|
||||
* If the property is neither {@link java.util.Collection Collection-like} nor a {@link java.util.Map},
|
||||
* then this attribute is ignored.
|
||||
* If the property is neither {@link java.util.Collection Collection-like} nor a {@link java.util.Map}, then this
|
||||
* attribute is ignored.
|
||||
*
|
||||
* @return an array of {@link DataType.Name} objects.
|
||||
* @see com.datastax.driver.core.DataType.Name
|
||||
@@ -54,10 +58,9 @@ public @interface CassandraType {
|
||||
DataType.Name[] typeArguments() default {};
|
||||
|
||||
/**
|
||||
* If the property maps to a User-Defined Type (UDT) then this attribute holds the user type name.
|
||||
*
|
||||
* For {@link java.util.Collection Collection-like} properties the user type name applies to the component type.
|
||||
* The user type name is only required if the UDT does not map to a class annotated with {@link UserDefinedType}.
|
||||
* If the property maps to a User-Defined Type (UDT) then this attribute holds the user type name. For
|
||||
* {@link java.util.Collection Collection-like} properties the user type name applies to the component type. The user
|
||||
* type name is only required if the UDT does not map to a class annotated with {@link UserDefinedType}.
|
||||
*
|
||||
* @return {@link String name} of the user type
|
||||
* @since 1.5
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.springframework.data.cassandra.core.mapping;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Inherited;
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -30,6 +31,7 @@ import java.lang.annotation.Target;
|
||||
* @since 2.1
|
||||
* @see Tuple
|
||||
*/
|
||||
@Documented
|
||||
@Inherited
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ ElementType.FIELD, ElementType.METHOD })
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.springframework.data.cassandra.core.mapping;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
@@ -48,6 +49,7 @@ import java.lang.annotation.Target;
|
||||
* @author Mark Paluch
|
||||
* @see Table
|
||||
*/
|
||||
@Documented
|
||||
@Retention(value = RetentionPolicy.RUNTIME)
|
||||
@Target(value = { ElementType.FIELD, ElementType.METHOD, ElementType.ANNOTATION_TYPE, ElementType.TYPE_USE })
|
||||
public @interface Indexed {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.springframework.data.cassandra.core.mapping;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
@@ -38,6 +39,7 @@ import org.springframework.data.annotation.Id;
|
||||
* @see Id
|
||||
* @see PrimaryKeyColumn
|
||||
*/
|
||||
@Documented
|
||||
@Retention(value = RetentionPolicy.RUNTIME)
|
||||
@Target(value = { ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD })
|
||||
@Id
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.springframework.data.cassandra.core.mapping;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Inherited;
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -34,6 +35,7 @@ import org.springframework.data.annotation.Persistent;
|
||||
* @author Mark Paluch
|
||||
* @see PrimaryKeyColumn
|
||||
*/
|
||||
@Documented
|
||||
@Inherited
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ ElementType.TYPE })
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.springframework.data.cassandra.core.mapping;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
@@ -36,6 +37,7 @@ import org.springframework.data.cassandra.core.cql.PrimaryKeyType;
|
||||
* @see PrimaryKey
|
||||
* @see PrimaryKeyClass
|
||||
*/
|
||||
@Documented
|
||||
@Retention(value = RetentionPolicy.RUNTIME)
|
||||
@Target(value = { ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD })
|
||||
public @interface PrimaryKeyColumn {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.springframework.data.cassandra.core.mapping;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
@@ -46,6 +47,7 @@ import org.springframework.core.annotation.AliasFor;
|
||||
* @see StandardAnalyzed
|
||||
* @see NonTokenizingAnalyzed
|
||||
*/
|
||||
@Documented
|
||||
@Retention(value = RetentionPolicy.RUNTIME)
|
||||
@Target(value = { ElementType.FIELD, ElementType.METHOD, ElementType.ANNOTATION_TYPE })
|
||||
public @interface SASI {
|
||||
@@ -86,7 +88,7 @@ public @interface SASI {
|
||||
* normalization, case sensitivity, skipping common words like "and" and "the", and localization of the language used
|
||||
* to complete the analysis
|
||||
*
|
||||
* @see org.apache.cassandra.index.sasi.analyzer.StandardAnalyzer.
|
||||
* @see org.apache.cassandra.index.sasi.analyzer.StandardAnalyzer
|
||||
*/
|
||||
@Retention(value = RetentionPolicy.RUNTIME)
|
||||
@Target(value = { ElementType.FIELD, ElementType.METHOD, ElementType.ANNOTATION_TYPE })
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.springframework.data.cassandra.core.mapping;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Inherited;
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -29,6 +30,7 @@ import org.springframework.data.annotation.Persistent;
|
||||
* @author Alex Shvid
|
||||
* @author Matthew T. Adams
|
||||
*/
|
||||
@Documented
|
||||
@Persistent
|
||||
@Inherited
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.springframework.data.cassandra.core.mapping;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Inherited;
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -45,6 +46,7 @@ import java.lang.annotation.Target;
|
||||
* @since 2.1
|
||||
* @see Element
|
||||
*/
|
||||
@Documented
|
||||
@Inherited
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ ElementType.TYPE })
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.springframework.data.cassandra.core.mapping;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Inherited;
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -29,6 +30,7 @@ import java.lang.annotation.Target;
|
||||
* @author Mark Paluch
|
||||
* @since 1.5
|
||||
*/
|
||||
@Documented
|
||||
@Inherited
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ ElementType.TYPE })
|
||||
|
||||
@@ -27,9 +27,9 @@ import java.lang.annotation.Target;
|
||||
* @author Mark Paluch
|
||||
* @since 2.0
|
||||
*/
|
||||
@Documented
|
||||
@Target({ ElementType.METHOD, ElementType.ANNOTATION_TYPE })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@Query(allowFiltering = true)
|
||||
public @interface AllowFiltering {
|
||||
}
|
||||
|
||||
@@ -33,9 +33,9 @@ import com.datastax.driver.core.ConsistencyLevel;
|
||||
* @see org.springframework.data.cassandra.core.cql.QueryOptions
|
||||
* @since 2.0
|
||||
*/
|
||||
@Documented
|
||||
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@QueryAnnotation
|
||||
public @interface Consistency {
|
||||
|
||||
|
||||
@@ -30,9 +30,9 @@ import org.springframework.core.annotation.AliasFor;
|
||||
* @author Mark Paluch
|
||||
* @since 2.1
|
||||
*/
|
||||
@Documented
|
||||
@Target({ ElementType.METHOD, ElementType.ANNOTATION_TYPE })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@Query(count = true)
|
||||
public @interface CountQuery {
|
||||
|
||||
|
||||
@@ -30,9 +30,9 @@ import org.springframework.core.annotation.AliasFor;
|
||||
* @author Mark Paluch
|
||||
* @since 2.1
|
||||
*/
|
||||
@Documented
|
||||
@Target({ ElementType.METHOD, ElementType.ANNOTATION_TYPE })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@Query(exists = true)
|
||||
public @interface ExistsQuery {
|
||||
|
||||
|
||||
@@ -30,9 +30,9 @@ import org.springframework.data.annotation.QueryAnnotation;
|
||||
* @author Matthew T. Adams
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
@Documented
|
||||
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@QueryAnnotation
|
||||
public @interface Query {
|
||||
|
||||
|
||||
@@ -40,9 +40,9 @@ import org.springframework.data.repository.query.QueryLookupStrategy.Key;
|
||||
* @author Thomas Darimont
|
||||
* @author Christoph Strobl
|
||||
*/
|
||||
@Documented
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@Inherited
|
||||
@Import(CassandraRepositoriesRegistrar.class)
|
||||
public @interface EnableCassandraRepositories {
|
||||
|
||||
@@ -38,9 +38,9 @@ import org.springframework.data.repository.query.QueryLookupStrategy.Key;
|
||||
* @author Mark Paluch
|
||||
* @since 2.0
|
||||
*/
|
||||
@Documented
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@Inherited
|
||||
@Import(ReactiveCassandraRepositoriesRegistrar.class)
|
||||
public @interface EnableReactiveCassandraRepositories {
|
||||
|
||||
Reference in New Issue
Block a user