diff --git a/src/main/java/org/springframework/data/annotation/Persistent.java b/src/main/java/org/springframework/data/annotation/Persistent.java index 2821f9481..c14dbb865 100644 --- a/src/main/java/org/springframework/data/annotation/Persistent.java +++ b/src/main/java/org/springframework/data/annotation/Persistent.java @@ -1,11 +1,11 @@ /* - * Copyright (c) 2011 by the original author(s). + * Copyright 2011-2017 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. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.springframework.data.annotation; import java.lang.annotation.ElementType; @@ -21,10 +20,16 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import org.springframework.stereotype.Indexed; + /** - * @author J. Brisbin + * Annotation to generally identify persistent types, fields and parameters. + * + * @author Jon Brisbin + * @author Oliver Gierke */ +@Indexed @Retention(RetentionPolicy.RUNTIME) -@Target(value = { ElementType.TYPE, ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.PARAMETER }) +@Target(value = { ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER }) public @interface Persistent { } diff --git a/src/main/java/org/springframework/data/repository/Repository.java b/src/main/java/org/springframework/data/repository/Repository.java index 46c0c4aee..3c22ab937 100644 --- a/src/main/java/org/springframework/data/repository/Repository.java +++ b/src/main/java/org/springframework/data/repository/Repository.java @@ -1,7 +1,24 @@ +/* + * Copyright 20011-2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.springframework.data.repository; import java.io.Serializable; +import org.springframework.stereotype.Indexed; + /** * Central repository marker interface. Captures the domain type to manage as well as the domain type's id type. General * purpose is to hold type information as well as being able to discover interfaces that extend this one during @@ -15,6 +32,7 @@ import java.io.Serializable; * @param the type of the id of the entity the repository manages * @author Oliver Gierke */ +@Indexed public interface Repository { } diff --git a/src/main/java/org/springframework/data/repository/RepositoryDefinition.java b/src/main/java/org/springframework/data/repository/RepositoryDefinition.java index c099d442f..cc2b4c3c6 100644 --- a/src/main/java/org/springframework/data/repository/RepositoryDefinition.java +++ b/src/main/java/org/springframework/data/repository/RepositoryDefinition.java @@ -1,5 +1,5 @@ /* - * Copyright 2011 the original author or authors. + * Copyright 2011-2017 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. @@ -23,6 +23,8 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import org.springframework.stereotype.Indexed; + /** * Annotation to demarcate interfaces a repository proxy shall be created for. Annotating an interface with * {@link RepositoryDefinition} will cause the same behaviour as extending {@link Repository}. @@ -30,6 +32,7 @@ import java.lang.annotation.Target; * @see Repository * @author Oliver Gierke */ +@Indexed @Documented @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE)