/*
 * Copyright 2011-2020 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
 *
 *      https://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 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 classpath scanning for easy Spring bean creation.

Domain repositories extending this interface can selectively expose CRUD methods by simply declaring methods of the same signature as those declared in CrudRepository.

Author:Oliver Gierke
Type parameters:
  • <T> – the domain type the repository manages
  • <ID> – the type of the id of the entity the repository manages
See Also:
/** * 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 * classpath scanning for easy Spring bean creation. * <p> * Domain repositories extending this interface can selectively expose CRUD methods by simply declaring methods of the * same signature as those declared in {@link CrudRepository}. * * @see CrudRepository * @param <T> the domain type the repository manages * @param <ID> the type of the id of the entity the repository manages * @author Oliver Gierke */
@Indexed public interface Repository<T, ID> { }