DATACMNS-589 - Polishing.
Made DefaultCrudMethods public to support better testing. Components that are based on CrudMethods can be tested easier if DefaultCrudMethods is public, so that an instance can easily be set up by using a DefaultRepositoryMetadata instance. Polished JavaDoc and copyright headers.
This commit is contained in:
@@ -39,7 +39,7 @@ import org.springframework.util.Assert;
|
||||
* @author Thomas Darimont
|
||||
* @since 1.6
|
||||
*/
|
||||
class DefaultCrudMethods implements CrudMethods {
|
||||
public class DefaultCrudMethods implements CrudMethods {
|
||||
|
||||
private static final String FIND_ONE = "findOne";
|
||||
private static final String SAVE = "save";
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.springframework.data.repository.core.RepositoryMetadata;
|
||||
* to avoid reflection overhead introduced by the base class if we know we work with a {@link CrudRepository}.
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.10
|
||||
*/
|
||||
class CrudRepositoryInvoker extends ReflectionRepositoryInvoker {
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ import org.springframework.util.Assert;
|
||||
* invocations over reflection ones.
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.10
|
||||
*/
|
||||
public class DefaultRepositoryInvokerFactory implements RepositoryInvokerFactory {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013 the original author or authors.
|
||||
* Copyright 2013-2014 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.
|
||||
@@ -31,6 +31,7 @@ import org.springframework.data.repository.core.RepositoryMetadata;
|
||||
* avoid reflection overhead introduced by the superclass.
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.10
|
||||
*/
|
||||
class PagingAndSortingRepositoryInvoker extends CrudRepositoryInvoker {
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ import org.springframework.util.StringUtils;
|
||||
* Base {@link RepositoryInvoker} using reflection to invoke methods on Spring Data Repositories.
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.10
|
||||
*/
|
||||
class ReflectionRepositoryInvoker implements RepositoryInvoker {
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ package org.springframework.data.repository.invoker;
|
||||
* Meta-information about the methods a repository exposes.
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.10
|
||||
*/
|
||||
public interface RepositoryInvocationInformation {
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.springframework.data.repository.PagingAndSortingRepository;
|
||||
* {@link RepositoryInvocationInformation}.
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.10
|
||||
*/
|
||||
public interface RepositoryInvoker extends RepositoryInvocationInformation {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013 the original author or authors.
|
||||
* Copyright 2013-2014 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.
|
||||
@@ -20,6 +20,7 @@ package org.springframework.data.repository.invoker;
|
||||
* type.
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.10
|
||||
*/
|
||||
public interface RepositoryInvokerFactory {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user