DATACMNS-1240 - Update copyright years to 2018.
Also, remove some trailing whitespaces and align outdated license header format.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
* Copyright 2014-2018 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.
|
||||
@@ -24,7 +24,7 @@ import java.lang.annotation.Target;
|
||||
/**
|
||||
* Annotation to define how Spring Data shall access values of persistent properties. Can either be {@link Type#FIELD}
|
||||
* or {@link Type#PROPERTY}. Default is field access.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@Documented
|
||||
@@ -34,7 +34,7 @@ public @interface AccessType {
|
||||
|
||||
/**
|
||||
* The access type to be used.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Type value();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2013 the original author or authors.
|
||||
* Copyright 2012-2018 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,7 +23,7 @@ import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Declares a field as the one representing the principal that created the entity containing the field.
|
||||
*
|
||||
*
|
||||
* @author Ranie Jade Ramiso
|
||||
* @author Oliver Gierke
|
||||
* @since 1.5
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2013 the original author or authors.
|
||||
* Copyright 2012-2018 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,7 +23,7 @@ import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Declares a field as the one representing the date the entity containing the field was created.
|
||||
*
|
||||
*
|
||||
* @author Ranie Jade Ramiso
|
||||
* @author Oliver Gierke
|
||||
* @since 1.5
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2013 the original author or authors.
|
||||
* Copyright 2011-2018 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,7 +23,7 @@ import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Demarcates an identifier.
|
||||
*
|
||||
*
|
||||
* @author Jon Brisbin
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2013 the original author or authors.
|
||||
* Copyright 2012-2018 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,7 +23,7 @@ import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Declares a field as the one representing the principal that recently modified the entity containing the field.
|
||||
*
|
||||
*
|
||||
* @author Ranie Jade Ramiso
|
||||
* @author Oliver Gierke
|
||||
* @since 1.5
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2013 the original author or authors.
|
||||
* Copyright 2012-2018 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,7 +23,7 @@ import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Declares a field as the one representing the date the entity containing the field was recently modified.
|
||||
*
|
||||
*
|
||||
* @author Ranie Jade Ramiso
|
||||
* @author Oliver Gierke
|
||||
* @since 1.5
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2011 by the original author(s).
|
||||
* Copyright 2011-2018 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;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2017 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
@@ -24,7 +24,7 @@ import org.springframework.stereotype.Indexed;
|
||||
|
||||
/**
|
||||
* Annotation to generally identify persistent types, fields and parameters.
|
||||
*
|
||||
*
|
||||
* @author Jon Brisbin
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013 the original author or authors.
|
||||
* Copyright 2013-2018 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.
|
||||
@@ -25,7 +25,7 @@ import org.springframework.data.repository.Repository;
|
||||
/**
|
||||
* Meta-Annotation to mark a store specific annotation as a query annotation. This allows generic special handing of
|
||||
* finder methods on {@link Repository} interfaces.
|
||||
*
|
||||
*
|
||||
* @author Thomas Darimont
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
* Copyright 2014-2018 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,7 +23,7 @@ import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Marks a field to be {@literal read-only} for the mapping framework and therefore will not be persisted.
|
||||
*
|
||||
*
|
||||
* @author Christoph Strobl
|
||||
* @since 1.9
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2013 the original author or authors.
|
||||
* Copyright 2011-2018 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,7 +23,7 @@ import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Meta-annotation to be used to annotate annotations that mark references to other objects.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Jon Brisbin
|
||||
*/
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright 2011-2014 by the original author(s).
|
||||
* Copyright 2011-2018 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,
|
||||
@@ -27,7 +27,7 @@ import org.springframework.data.mapping.PersistentEntity;
|
||||
/**
|
||||
* Annotation to allow {@link String} based type aliases to be used when writing type information for
|
||||
* {@link PersistentEntity}s.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@Documented
|
||||
@@ -39,7 +39,7 @@ public @interface TypeAlias {
|
||||
|
||||
/**
|
||||
* The type alias to be used when persisting
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String value();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2013 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -24,7 +24,7 @@ import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Demarcates a property to be used as version field to implement optimistic locking on entities.
|
||||
*
|
||||
*
|
||||
* @since 1.5
|
||||
* @author Patryk Wasik
|
||||
* @author Oliver Gierke
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -38,7 +38,7 @@ import org.springframework.util.Assert;
|
||||
/**
|
||||
* Inspects the given {@link Class} for fields annotated by {@link CreatedBy}, {@link CreatedDate},
|
||||
* {@link LastModifiedBy} , and {@link LastModifiedDate}. Only one field per annotation is stored.
|
||||
*
|
||||
*
|
||||
* @author Ranie Jade Ramiso
|
||||
* @author Oliver Gierke
|
||||
* @author Christoph Strobl
|
||||
@@ -78,7 +78,7 @@ final class AnnotationAuditingMetadata {
|
||||
|
||||
/**
|
||||
* Creates a new {@link AnnotationAuditingMetadata} instance for the given type.
|
||||
*
|
||||
*
|
||||
* @param type must not be {@literal null}.
|
||||
*/
|
||||
private AnnotationAuditingMetadata(Class<?> type) {
|
||||
@@ -96,7 +96,7 @@ final class AnnotationAuditingMetadata {
|
||||
|
||||
/**
|
||||
* Checks whether the given field has a type that is a supported date type.
|
||||
*
|
||||
*
|
||||
* @param field
|
||||
*/
|
||||
private void assertValidDateFieldType(Optional<Field> field) {
|
||||
@@ -121,7 +121,7 @@ final class AnnotationAuditingMetadata {
|
||||
|
||||
/**
|
||||
* Return a {@link AnnotationAuditingMetadata} for the given {@link Class}.
|
||||
*
|
||||
*
|
||||
* @param type the type to inspect, must not be {@literal null}.
|
||||
*/
|
||||
public static AnnotationAuditingMetadata getMetadata(Class<?> type) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2015 the original author or authors.
|
||||
* Copyright 2012-2018 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,7 +20,7 @@ import java.util.Optional;
|
||||
|
||||
/**
|
||||
* Interface to abstract the ways setting the auditing information can be implemented.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.5
|
||||
*/
|
||||
@@ -28,28 +28,28 @@ public interface AuditableBeanWrapper {
|
||||
|
||||
/**
|
||||
* Set the creator of the object.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
Object setCreatedBy(Object value);
|
||||
|
||||
/**
|
||||
* Set the date the object was created.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
TemporalAccessor setCreatedDate(TemporalAccessor value);
|
||||
|
||||
/**
|
||||
* Set the last modifier of the object.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
Object setLastModifiedBy(Object value);
|
||||
|
||||
/**
|
||||
* Returns the date of the last modification date of the backing bean.
|
||||
*
|
||||
*
|
||||
* @return the date of the last modification.
|
||||
* @since 1.10
|
||||
*/
|
||||
@@ -57,7 +57,7 @@ public interface AuditableBeanWrapper {
|
||||
|
||||
/**
|
||||
* Set the last modification date.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
TemporalAccessor setLastModifiedDate(TemporalAccessor value);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2017 the original author or authors.
|
||||
* Copyright 2015-2018 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.
|
||||
@@ -19,7 +19,7 @@ import java.util.Optional;
|
||||
|
||||
/**
|
||||
* A factory to lookup {@link AuditableBeanWrapper}s.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.10
|
||||
*/
|
||||
@@ -27,7 +27,7 @@ public interface AuditableBeanWrapperFactory {
|
||||
|
||||
/**
|
||||
* Returns the {@link AuditableBeanWrapper} for the given source object if it's eligible for auditing.
|
||||
*
|
||||
*
|
||||
* @param source must not be {@literal null}.
|
||||
* @return the {@link AuditableBeanWrapper} for the given source object if it's eligible for auditing.
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -34,7 +34,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Auditing handler to mark entity objects created and modified.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Christoph Strobl
|
||||
* @since 1.5
|
||||
@@ -53,7 +53,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
/**
|
||||
* Creates a new {@link AuditableBeanWrapper} using the given {@link MappingContext} when looking up auditing metadata
|
||||
* via reflection.
|
||||
*
|
||||
*
|
||||
* @param mappingContext must not be {@literal null}.
|
||||
* @since 1.8
|
||||
* @deprecated use {@link AuditingHandler(PersistentEntities)} instead.
|
||||
@@ -67,7 +67,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
/**
|
||||
* Creates a new {@link AuditableBeanWrapper} using the given {@link PersistentEntities} when looking up auditing
|
||||
* metadata via reflection.
|
||||
*
|
||||
*
|
||||
* @param entities must not be {@literal null}.
|
||||
* @since 1.10
|
||||
*/
|
||||
@@ -81,7 +81,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
|
||||
/**
|
||||
* Setter to inject a {@code AuditorAware} component to retrieve the current auditor.
|
||||
*
|
||||
*
|
||||
* @param auditorAware must not be {@literal null}.
|
||||
*/
|
||||
public void setAuditorAware(AuditorAware<?> auditorAware) {
|
||||
@@ -94,7 +94,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
* Setter do determine if {@link Auditable#setCreatedDate(DateTime)} and
|
||||
* {@link Auditable#setLastModifiedDate(DateTime)} shall be filled with the current Java time. Defaults to
|
||||
* {@code true}. One might set this to {@code false} to use database features to set entity time.
|
||||
*
|
||||
*
|
||||
* @param dateTimeForNow the dateTimeForNow to set
|
||||
*/
|
||||
public void setDateTimeForNow(boolean dateTimeForNow) {
|
||||
@@ -104,7 +104,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
/**
|
||||
* Set this to false if you want to treat entity creation as modification and thus set the current date as
|
||||
* modification date, too. Defaults to {@code true}.
|
||||
*
|
||||
*
|
||||
* @param modifyOnCreation if modification information shall be set on creation, too
|
||||
*/
|
||||
public void setModifyOnCreation(boolean modifyOnCreation) {
|
||||
@@ -113,7 +113,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
|
||||
/**
|
||||
* Sets the {@link DateTimeProvider} to be used to determine the dates to be set.
|
||||
*
|
||||
*
|
||||
* @param dateTimeProvider
|
||||
*/
|
||||
public void setDateTimeProvider(DateTimeProvider dateTimeProvider) {
|
||||
@@ -122,7 +122,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
|
||||
/**
|
||||
* Marks the given object as created.
|
||||
*
|
||||
*
|
||||
* @param source
|
||||
*/
|
||||
public void markCreated(Object source) {
|
||||
@@ -134,7 +134,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
|
||||
/**
|
||||
* Marks the given object as modified.
|
||||
*
|
||||
*
|
||||
* @param source
|
||||
*/
|
||||
public void markModified(Object source) {
|
||||
@@ -177,7 +177,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
|
||||
/**
|
||||
* Sets modifying and creating auditor. Creating auditor is only set on new auditables.
|
||||
*
|
||||
*
|
||||
* @param auditable
|
||||
* @return
|
||||
*/
|
||||
@@ -202,7 +202,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
|
||||
/**
|
||||
* Touches the auditable regarding modification and creation date. Creation date is only set on new auditables.
|
||||
*
|
||||
*
|
||||
* @param wrapper
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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,7 +23,7 @@ import org.joda.time.DateTime;
|
||||
|
||||
/**
|
||||
* Default {@link DateTimeProvider} simply creating new {@link DateTime} instances for each method call.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Christoph Strobl
|
||||
* @since 1.5
|
||||
@@ -32,7 +32,7 @@ public enum CurrentDateTimeProvider implements DateTimeProvider {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.DateTimeProvider#getNow()
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2014 the original author or authors.
|
||||
* Copyright 2012-2018 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,7 +20,7 @@ import java.util.Optional;
|
||||
|
||||
/**
|
||||
* SPI to calculate the current time to be used when auditing.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.5
|
||||
*/
|
||||
@@ -28,7 +28,7 @@ public interface DateTimeProvider {
|
||||
|
||||
/**
|
||||
* Returns the current time to be used as modification or creation date.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Optional<TemporalAccessor> getNow();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -39,7 +39,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* A factory class to {@link AuditableBeanWrapper} instances.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Christoph Strobl
|
||||
* @since 1.5
|
||||
@@ -48,7 +48,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
|
||||
/**
|
||||
* Returns an {@link AuditableBeanWrapper} if the given object is capable of being equipped with auditing information.
|
||||
*
|
||||
*
|
||||
* @param source the auditing candidate.
|
||||
* @return
|
||||
*/
|
||||
@@ -75,7 +75,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
|
||||
/**
|
||||
* An {@link AuditableBeanWrapper} that works with objects implementing
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@@ -92,7 +92,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
.getGeneric(2).resolve(TemporalAccessor.class);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.AuditableBeanWrapper#setCreatedBy(java.util.Optional)
|
||||
*/
|
||||
@@ -103,7 +103,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
return value;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.AuditableBeanWrapper#setCreatedDate(java.util.Optional)
|
||||
*/
|
||||
@@ -116,7 +116,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
return value;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.DefaultAuditableBeanWrapperFactory.AuditableInterfaceBeanWrapper#setLastModifiedBy(java.util.Optional)
|
||||
*/
|
||||
@@ -128,7 +128,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
return value;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.AuditableBeanWrapper#getLastModifiedDate()
|
||||
*/
|
||||
@@ -137,7 +137,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
return getAsTemporalAccessor(auditable.getLastModifiedDate(), TemporalAccessor.class);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.AuditableBeanWrapper#setLastModifiedDate(java.util.Optional)
|
||||
*/
|
||||
@@ -154,7 +154,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
/**
|
||||
* Base class for {@link AuditableBeanWrapper} implementations that might need to convert {@link Calendar} values into
|
||||
* compatible types when setting date/time information.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.8
|
||||
*/
|
||||
@@ -178,7 +178,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
|
||||
/**
|
||||
* Returns the {@link Calendar} in a type, compatible to the given field.
|
||||
*
|
||||
*
|
||||
* @param value can be {@literal null}.
|
||||
* @param targetType must not be {@literal null}.
|
||||
* @param source must not be {@literal null}.
|
||||
@@ -213,7 +213,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
|
||||
/**
|
||||
* Returns the given object as {@link Calendar}.
|
||||
*
|
||||
*
|
||||
* @param source can be {@literal null}.
|
||||
* @param target must not be {@literal null}.
|
||||
* @return
|
||||
@@ -243,7 +243,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
|
||||
/**
|
||||
* An {@link AuditableBeanWrapper} implementation that sets values on the target object using reflection.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
static class ReflectionAuditingBeanWrapper extends DateConvertingAuditableBeanWrapper {
|
||||
@@ -253,7 +253,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
|
||||
/**
|
||||
* Creates a new {@link ReflectionAuditingBeanWrapper} to set auditing data on the given target object.
|
||||
*
|
||||
*
|
||||
* @param target must not be {@literal null}.
|
||||
*/
|
||||
public ReflectionAuditingBeanWrapper(Object target) {
|
||||
@@ -264,7 +264,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.AuditableBeanWrapper#setCreatedBy(java.util.Optional)
|
||||
*/
|
||||
@@ -273,7 +273,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
return setField(metadata.getCreatedByField(), value);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.AuditableBeanWrapper#setCreatedDate(java.util.Optional)
|
||||
*/
|
||||
@@ -283,7 +283,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
return setDateField(metadata.getCreatedDateField(), value);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.AuditableBeanWrapper#setLastModifiedBy(java.util.Optional)
|
||||
*/
|
||||
@@ -292,7 +292,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
return setField(metadata.getLastModifiedByField(), value);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.AuditableBeanWrapper#getLastModifiedDate()
|
||||
*/
|
||||
@@ -307,7 +307,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
}), TemporalAccessor.class);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.AuditableBeanWrapper#setLastModifiedDate(java.util.Optional)
|
||||
*/
|
||||
@@ -318,7 +318,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
|
||||
/**
|
||||
* Sets the given field to the given value if present.
|
||||
*
|
||||
*
|
||||
* @param field
|
||||
* @param value
|
||||
*/
|
||||
@@ -331,7 +331,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
|
||||
/**
|
||||
* Sets the given field to the given value if the field is not {@literal null}.
|
||||
*
|
||||
*
|
||||
* @param field
|
||||
* @param value
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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,7 +31,7 @@ import org.springframework.util.Assert;
|
||||
* {@link AuditingHandler} extension that uses an {@link IsNewStrategyFactory} to expose a generic
|
||||
* {@link #markAudited(Optional)} method that will route calls to {@link #markCreated(Optional)} or
|
||||
* {@link #markModified(Optional)} based on the {@link IsNewStrategy} determined from the factory.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Christoph Strobl
|
||||
* @since 1.5
|
||||
@@ -42,7 +42,7 @@ public class IsNewAwareAuditingHandler extends AuditingHandler {
|
||||
|
||||
/**
|
||||
* Creates a new {@link IsNewAwareAuditingHandler} for the given {@link MappingContext}.
|
||||
*
|
||||
*
|
||||
* @param mappingContext must not be {@literal null}.
|
||||
* @since 1.8
|
||||
* @deprecated use {@link IsNewAwareAuditingHandler(PersistentEntities)} instead.
|
||||
@@ -55,7 +55,7 @@ public class IsNewAwareAuditingHandler extends AuditingHandler {
|
||||
|
||||
/**
|
||||
* Creates a new {@link IsNewAwareAuditingHandler} for the given {@link MappingContext}.
|
||||
*
|
||||
*
|
||||
* @param entities must not be {@literal null}.
|
||||
* @since 1.10
|
||||
*/
|
||||
@@ -70,7 +70,7 @@ public class IsNewAwareAuditingHandler extends AuditingHandler {
|
||||
* Marks the given object created or modified based on the {@link IsNewStrategy} returned by the
|
||||
* {@link IsNewStrategyFactory} configured. Will rout the calls to {@link #markCreated(Optional)} and
|
||||
* {@link #markModified(Optional)} accordingly.
|
||||
*
|
||||
*
|
||||
* @param object
|
||||
*/
|
||||
public void markAudited(Object object) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2017 the original author or authors.
|
||||
* Copyright 2014-2018 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2014 the original author or authors.
|
||||
* Copyright 2013-2018 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.
|
||||
@@ -24,7 +24,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Default implementation for {@link AuditingConfiguration}.
|
||||
*
|
||||
*
|
||||
* @author Ranie Jade Ramiso
|
||||
* @author Thomas Darimont
|
||||
* @author Oliver Gierke
|
||||
@@ -38,7 +38,7 @@ public class AnnotationAuditingConfiguration implements AuditingConfiguration {
|
||||
/**
|
||||
* Creates a new instance of {@link AnnotationAuditingConfiguration} for the given {@link AnnotationMetadata} and
|
||||
* annotation type.
|
||||
*
|
||||
*
|
||||
* @param metadata must not be {@literal null}.
|
||||
* @param annotation must not be {@literal null}.
|
||||
*/
|
||||
@@ -65,7 +65,7 @@ public class AnnotationAuditingConfiguration implements AuditingConfiguration {
|
||||
return attributes.getString("auditorAwareRef");
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.config.AuditingConfiguration#isSetDates()
|
||||
*/
|
||||
@@ -74,7 +74,7 @@ public class AnnotationAuditingConfiguration implements AuditingConfiguration {
|
||||
return attributes.getBoolean("setDates");
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.config.AuditingConfiguration#getDateTimeProviderRef()
|
||||
*/
|
||||
@@ -83,7 +83,7 @@ public class AnnotationAuditingConfiguration implements AuditingConfiguration {
|
||||
return attributes.getString("dateTimeProviderRef");
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.config.AuditingConfiguration#isModifyOnCreate()
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2014 the original author or authors.
|
||||
* Copyright 2013-2018 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.
|
||||
@@ -37,7 +37,7 @@ import org.springframework.util.StringUtils;
|
||||
* A {@link ImportBeanDefinitionRegistrar} that serves as a base class for store specific implementations for
|
||||
* configuring audit support. Registers a {@link AuditingHandler} based on the provided configuration(
|
||||
* {@link AuditingConfiguration}).
|
||||
*
|
||||
*
|
||||
* @author Ranie Jade Ramiso
|
||||
* @author Thomas Darimont
|
||||
* @author Oliver Gierke
|
||||
@@ -65,7 +65,7 @@ public abstract class AuditingBeanDefinitionRegistrarSupport implements ImportBe
|
||||
|
||||
/**
|
||||
* Registers an appropriate BeanDefinition for an {@link AuditingHandler}.
|
||||
*
|
||||
*
|
||||
* @param registry must not be {@literal null}.
|
||||
* @param configuration must not be {@literal null}.
|
||||
* @return
|
||||
@@ -84,7 +84,7 @@ public abstract class AuditingBeanDefinitionRegistrarSupport implements ImportBe
|
||||
/**
|
||||
* Creates a {@link BeanDefinitionBuilder} to ease the definition of store specific {@link AuditingHandler}
|
||||
* implementations.
|
||||
*
|
||||
*
|
||||
* @param configuration must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -99,7 +99,7 @@ public abstract class AuditingBeanDefinitionRegistrarSupport implements ImportBe
|
||||
/**
|
||||
* Configures the given {@link BeanDefinitionBuilder} with the default attributes from the given
|
||||
* {@link AuditingConfiguration}.
|
||||
*
|
||||
*
|
||||
* @param configuration must not be {@literal null}.
|
||||
* @param builder must not be {@literal null}.
|
||||
* @return the builder with the audit attributes configured.
|
||||
@@ -130,7 +130,7 @@ public abstract class AuditingBeanDefinitionRegistrarSupport implements ImportBe
|
||||
|
||||
/**
|
||||
* Retrieve auditing configuration from the given {@link AnnotationMetadata}.
|
||||
*
|
||||
*
|
||||
* @param annotationMetadata will never be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -140,14 +140,14 @@ public abstract class AuditingBeanDefinitionRegistrarSupport implements ImportBe
|
||||
|
||||
/**
|
||||
* Return the annotation type to lookup configuration values from.
|
||||
*
|
||||
*
|
||||
* @return must not be {@literal null}.
|
||||
*/
|
||||
protected abstract Class<? extends Annotation> getAnnotation();
|
||||
|
||||
/**
|
||||
* Register the listener to eventually trigger the {@link AuditingHandler}.
|
||||
*
|
||||
*
|
||||
* @param auditingHandlerDefinition will never be {@literal null}.
|
||||
* @param registry will never be {@literal null}.
|
||||
*/
|
||||
@@ -156,14 +156,14 @@ public abstract class AuditingBeanDefinitionRegistrarSupport implements ImportBe
|
||||
|
||||
/**
|
||||
* Return the name to be used to register the {@link AuditingHandler} under.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
protected abstract String getAuditingHandlerBeanName();
|
||||
|
||||
/**
|
||||
* Registers the given {@link AbstractBeanDefinition} as infrastructure bean under the given id.
|
||||
*
|
||||
*
|
||||
* @param definition must not be {@literal null}.
|
||||
* @param id must not be {@literal null} or empty.
|
||||
* @param registry must not be {@literal null}.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013 the original author or authors.
|
||||
* Copyright 2013-2018 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,7 +20,7 @@ import org.springframework.data.domain.AuditorAware;
|
||||
|
||||
/**
|
||||
* Configuration information for auditing.
|
||||
*
|
||||
*
|
||||
* @author Ranie Jade Ramiso
|
||||
* @author Thomas Darimont
|
||||
* @author Oliver Gierke
|
||||
@@ -29,28 +29,28 @@ public interface AuditingConfiguration {
|
||||
|
||||
/**
|
||||
* Returns the bean name of the {@link AuditorAware} instance to be used..
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getAuditorAwareRef();
|
||||
|
||||
/**
|
||||
* Returns whether the creation and modification dates shall be set. Defaults to {@literal true}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isSetDates();
|
||||
|
||||
/**
|
||||
* Returns whether the entity shall be marked as modified on creation. Defaults to {@literal true}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isModifyOnCreate();
|
||||
|
||||
/**
|
||||
* Returns the bean name of the {@link DateTimeProvider} to be used.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getDateTimeProviderRef();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2014 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -36,7 +36,7 @@ import org.w3c.dom.Element;
|
||||
|
||||
/**
|
||||
* {@link BeanDefinitionParser} that parses an {@link AuditingHandler} {@link BeanDefinition}
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.5
|
||||
*/
|
||||
@@ -50,7 +50,7 @@ public class AuditingHandlerBeanDefinitionParser extends AbstractSingleBeanDefin
|
||||
/**
|
||||
* Creates a new {@link AuditingHandlerBeanDefinitionParser} to point to a {@link MappingContext} with the given bean
|
||||
* name.
|
||||
*
|
||||
*
|
||||
* @param mappingContextBeanName must not be {@literal null} or empty.
|
||||
*/
|
||||
@SuppressWarnings("null")
|
||||
@@ -62,14 +62,14 @@ public class AuditingHandlerBeanDefinitionParser extends AbstractSingleBeanDefin
|
||||
|
||||
/**
|
||||
* Returns the name of the bean definition the {@link AuditingHandler} was registered under.
|
||||
*
|
||||
*
|
||||
* @return the resolvedBeanName
|
||||
*/
|
||||
public String getResolvedBeanName() {
|
||||
return resolvedBeanName;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser#getBeanClass(org.w3c.dom.Element)
|
||||
*/
|
||||
@@ -79,7 +79,7 @@ public class AuditingHandlerBeanDefinitionParser extends AbstractSingleBeanDefin
|
||||
return AuditingHandler.class;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.xml.AbstractBeanDefinitionParser#shouldGenerateId()
|
||||
*/
|
||||
@@ -88,7 +88,7 @@ public class AuditingHandlerBeanDefinitionParser extends AbstractSingleBeanDefin
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser#doParse(org.w3c.dom.Element, org.springframework.beans.factory.support.BeanDefinitionBuilder)
|
||||
*/
|
||||
@@ -108,7 +108,7 @@ public class AuditingHandlerBeanDefinitionParser extends AbstractSingleBeanDefin
|
||||
ParsingUtils.setPropertyValue(builder, element, "modify-on-creation", "modifyOnCreation");
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.xml.AbstractBeanDefinitionParser#resolveId(org.w3c.dom.Element, org.springframework.beans.factory.support.AbstractBeanDefinition, org.springframework.beans.factory.xml.ParserContext)
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2014 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -22,7 +22,7 @@ import org.w3c.dom.Element;
|
||||
/**
|
||||
* {@link AuditingHandlerBeanDefinitionParser} that will register am {@link IsNewAwareAuditingHandler}. Needs to get the
|
||||
* bean id of the {@link MappingContext} it shall refer to.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.5
|
||||
*/
|
||||
@@ -30,14 +30,14 @@ public class IsNewAwareAuditingHandlerBeanDefinitionParser extends AuditingHandl
|
||||
|
||||
/**
|
||||
* Creates a new {@link IsNewAwareAuditingHandlerBeanDefinitionParser}.
|
||||
*
|
||||
*
|
||||
* @param mappingContextBeanName must not be {@literal null} or empty.
|
||||
*/
|
||||
public IsNewAwareAuditingHandlerBeanDefinitionParser(String mappingContextBeanName) {
|
||||
super(mappingContextBeanName);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.config.AuditingHandlerBeanDefinitionParser#getBeanClass(org.w3c.dom.Element)
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2012 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
@@ -21,7 +21,7 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Class used to provide credentials for username/password authentication
|
||||
*
|
||||
*
|
||||
* @author Thomas Risberg
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@@ -34,7 +34,7 @@ public class UserCredentials {
|
||||
/**
|
||||
* Creates a new {@link UserCredentials} instance from the given username and password. Empty {@link String}s provided
|
||||
* will be treated like no username or password set.
|
||||
*
|
||||
*
|
||||
* @param username
|
||||
* @param password
|
||||
*/
|
||||
@@ -45,7 +45,7 @@ public class UserCredentials {
|
||||
|
||||
/**
|
||||
* Get the username to use for authentication.
|
||||
*
|
||||
*
|
||||
* @return the username
|
||||
*/
|
||||
@Nullable
|
||||
@@ -55,7 +55,7 @@ public class UserCredentials {
|
||||
|
||||
/**
|
||||
* Get the password to use for authentication.
|
||||
*
|
||||
*
|
||||
* @return the password
|
||||
*/
|
||||
@Nullable
|
||||
@@ -65,7 +65,7 @@ public class UserCredentials {
|
||||
|
||||
/**
|
||||
* Returns whether the credentials contain a username.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean hasUsername() {
|
||||
@@ -74,7 +74,7 @@ public class UserCredentials {
|
||||
|
||||
/**
|
||||
* Returns whether the credentials contain a password.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean hasPassword() {
|
||||
@@ -84,7 +84,7 @@ public class UserCredentials {
|
||||
/**
|
||||
* Returns the password in obfuscated fashion which means everything except the first and last character replaced by
|
||||
* stars. If the password is one or two characters long we'll obfuscate it entirely.
|
||||
*
|
||||
*
|
||||
* @return the obfuscated password
|
||||
*/
|
||||
@Nullable
|
||||
@@ -116,7 +116,7 @@ public class UserCredentials {
|
||||
return builder.append(password.substring(password.length() - 1)).toString();
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -26,7 +26,7 @@ import org.w3c.dom.Element;
|
||||
|
||||
/**
|
||||
* Helper to create {@link BeanComponentDefinition} more easily.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class BeanComponentDefinitionBuilder {
|
||||
@@ -37,7 +37,7 @@ public class BeanComponentDefinitionBuilder {
|
||||
/**
|
||||
* Creates a new {@link BeanComponentDefinitionBuilder} using the given {@link Element} as default source and the
|
||||
* given {@link ParserContext}.
|
||||
*
|
||||
*
|
||||
* @param defaultSource must not be {@literal null}.
|
||||
* @param context must not be {@literal null}.
|
||||
*/
|
||||
@@ -52,7 +52,7 @@ public class BeanComponentDefinitionBuilder {
|
||||
|
||||
/**
|
||||
* Creates a {@link BeanComponentDefinition} from the given {@link BeanDefinitionBuilder}. Will generate a bean name.
|
||||
*
|
||||
*
|
||||
* @param builder must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -69,7 +69,7 @@ public class BeanComponentDefinitionBuilder {
|
||||
/**
|
||||
* Creates a {@link BeanComponentDefinition} from the given {@link BeanDefinitionBuilder} and inspects the backing
|
||||
* {@link Element}s id attribute for a name. It will use this one if found or the given fallback if not.
|
||||
*
|
||||
*
|
||||
* @param builder must not be {@literal null}.
|
||||
* @param fallback must not be {@literal null} or empty.
|
||||
* @return
|
||||
@@ -84,7 +84,7 @@ public class BeanComponentDefinitionBuilder {
|
||||
|
||||
/**
|
||||
* Creates a {@link BeanComponentDefinition} from the given {@link BeanDefinitionBuilder} using the given name.
|
||||
*
|
||||
*
|
||||
* @param builder must not be {@literal null}.
|
||||
* @param name must not be {@literal null} or empty.
|
||||
* @return
|
||||
@@ -96,7 +96,7 @@ public class BeanComponentDefinitionBuilder {
|
||||
/**
|
||||
* Creates a new {@link BeanComponentDefinition} from the given {@link BeanDefinitionBuilder} using the given name and
|
||||
* raw source object.
|
||||
*
|
||||
*
|
||||
* @param builder must not be {@literal null}.
|
||||
* @param name must not be {@literal null}.
|
||||
* @param rawSource
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2017 the original author or authors.
|
||||
* Copyright 2017-2018 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,7 +23,7 @@ import org.springframework.util.Assert;
|
||||
/**
|
||||
* Helper class to centralize common functionality that needs to be used in various places of the configuration
|
||||
* implementation.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 2.0
|
||||
* @soundtrack Richard Spaven - The Self (feat. Jordan Rakei)
|
||||
@@ -32,7 +32,7 @@ public interface ConfigurationUtils {
|
||||
|
||||
/**
|
||||
* Returns the {@link ResourceLoader} from the given {@link XmlReaderContext}.
|
||||
*
|
||||
*
|
||||
* @param context must not be {@literal null}.
|
||||
* @return
|
||||
* @throws IllegalArgumentException if no {@link ResourceLoader} can be obtained from the {@link XmlReaderContext}.
|
||||
@@ -52,7 +52,7 @@ public interface ConfigurationUtils {
|
||||
|
||||
/**
|
||||
* Returns the {@link ClassLoader} used by the given {@link XmlReaderContext}.
|
||||
*
|
||||
*
|
||||
* @param context must not be {@literal null}.
|
||||
* @return
|
||||
* @throws IllegalArgumentException if no {@link ClassLoader} can be obtained from the given {@link XmlReaderContext}.
|
||||
@@ -63,7 +63,7 @@ public interface ConfigurationUtils {
|
||||
|
||||
/**
|
||||
* Returns the {@link ClassLoader} used by the given {@link ResourceLoader}.
|
||||
*
|
||||
*
|
||||
* @param resourceLoader must not be {@literal null}.
|
||||
* @return
|
||||
* @throws IllegalArgumentException if the given {@link ResourceLoader} does not expose a {@link ClassLoader}.
|
||||
@@ -83,7 +83,7 @@ public interface ConfigurationUtils {
|
||||
|
||||
/**
|
||||
* Returns the bean class name of the given {@link BeanDefinition}.
|
||||
*
|
||||
*
|
||||
* @param beanDefinition must not be {@literal null}.
|
||||
* @return
|
||||
* @throws IllegalArgumentException if the given {@link BeanDefinition} does not contain a bean class name.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2017 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
@@ -28,7 +28,7 @@ import org.w3c.dom.Element;
|
||||
|
||||
/**
|
||||
* Utility methods for {@link BeanDefinitionParser} implementations.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
@@ -41,7 +41,7 @@ public abstract class ParsingUtils {
|
||||
/**
|
||||
* Configures a property value for the given property name reading the attribute of the given name from the given
|
||||
* {@link Element} if the attribute is configured.
|
||||
*
|
||||
*
|
||||
* @param builder must not be {@literal null}.
|
||||
* @param element must not be {@literal null}.
|
||||
* @param attrName must not be {@literal null} or empty.
|
||||
@@ -65,7 +65,7 @@ public abstract class ParsingUtils {
|
||||
/**
|
||||
* Sets the property with the given attribute name on the given {@link BeanDefinitionBuilder} to the value of the
|
||||
* attribute with the given name if the attribute is configured.
|
||||
*
|
||||
*
|
||||
* @param builder must not be {@literal null}.
|
||||
* @param element must not be {@literal null}.
|
||||
* @param attribute must not be {@literal null} or empty.
|
||||
@@ -76,7 +76,7 @@ public abstract class ParsingUtils {
|
||||
|
||||
/**
|
||||
* Configures a bean property reference with the value of the attribute of the given name if it is configured.
|
||||
*
|
||||
*
|
||||
* @param builder must not be {@literal null}.
|
||||
* @param element must not be {@literal null}.
|
||||
* @param attribute must not be {@literal null} or empty.
|
||||
@@ -100,7 +100,7 @@ public abstract class ParsingUtils {
|
||||
/**
|
||||
* Returns the {@link BeanDefinition} built by the given {@link BeanDefinitionBuilder} enriched with source
|
||||
* information derived from the given {@link Element}.
|
||||
*
|
||||
*
|
||||
* @param builder must not be {@literal null}.
|
||||
* @param context must not be {@literal null}.
|
||||
* @param element must not be {@literal null}.
|
||||
@@ -117,7 +117,7 @@ public abstract class ParsingUtils {
|
||||
|
||||
/**
|
||||
* Returns the {@link AbstractBeanDefinition} built by the given builder with the given extracted source applied.
|
||||
*
|
||||
*
|
||||
* @param builder must not be {@literal null}.
|
||||
* @param source
|
||||
* @return
|
||||
@@ -134,7 +134,7 @@ public abstract class ParsingUtils {
|
||||
/**
|
||||
* Returns a {@link BeanDefinition} for an {@link ObjectFactoryCreatingFactoryBean} pointing to the bean with the
|
||||
* given name.
|
||||
*
|
||||
*
|
||||
* @param targetBeanName must not be {@literal null} or empty.
|
||||
* @param source
|
||||
* @return
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 the original author or authors.
|
||||
* Copyright 2010-2018 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.
|
||||
@@ -39,7 +39,7 @@ import org.w3c.dom.NodeList;
|
||||
/**
|
||||
* Parser to populate the given {@link ClassPathScanningCandidateComponentProvider} with {@link TypeFilter}s parsed from
|
||||
* the given {@link Element}'s children.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class TypeFilterParser {
|
||||
@@ -52,7 +52,7 @@ public class TypeFilterParser {
|
||||
|
||||
/**
|
||||
* Creates a new {@link TypeFilterParser} with the given {@link ReaderContext}.
|
||||
*
|
||||
*
|
||||
* @param readerContext must not be {@literal null}.
|
||||
*/
|
||||
public TypeFilterParser(XmlReaderContext readerContext) {
|
||||
@@ -62,7 +62,7 @@ public class TypeFilterParser {
|
||||
/**
|
||||
* Constructor to ease testing as {@link XmlReaderContext#getBeanClassLoader()} is final and thus cannot be mocked
|
||||
* easily.
|
||||
*
|
||||
*
|
||||
* @param readerContext must not be {@literal null}.
|
||||
* @param classLoader must not be {@literal null}.
|
||||
*/
|
||||
@@ -78,7 +78,7 @@ public class TypeFilterParser {
|
||||
/**
|
||||
* Returns all {@link TypeFilter} declared in nested elements of the given {@link Element}. Allows to selectively
|
||||
* retrieve including or excluding filters based on the given {@link Type}.
|
||||
*
|
||||
*
|
||||
* @param element must not be {@literal null}.
|
||||
* @param type must not be {@literal null}.
|
||||
* @return
|
||||
@@ -109,7 +109,7 @@ public class TypeFilterParser {
|
||||
|
||||
/**
|
||||
* Creates a {@link TypeFilter} instance from the given {@link Element} and {@link ClassLoader}.
|
||||
*
|
||||
*
|
||||
* @param element must not be {@literal null}.
|
||||
* @param classLoader must not be {@literal null}.
|
||||
* @return
|
||||
@@ -132,7 +132,7 @@ public class TypeFilterParser {
|
||||
/**
|
||||
* Enum representing all the filter types available for {@code include} and {@code exclude} elements. This acts as
|
||||
* factory for {@link TypeFilter} instances.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @see #getFilter(String, ClassLoader)
|
||||
*/
|
||||
@@ -182,7 +182,7 @@ public class TypeFilterParser {
|
||||
|
||||
/**
|
||||
* Returns the {@link TypeFilter} for the given expression and {@link ClassLoader}.
|
||||
*
|
||||
*
|
||||
* @param expression
|
||||
* @param classLoader
|
||||
* @return
|
||||
@@ -192,7 +192,7 @@ public class TypeFilterParser {
|
||||
|
||||
/**
|
||||
* Returns the {@link FilterType} for the given type as {@link String}.
|
||||
*
|
||||
*
|
||||
* @param typeString
|
||||
* @return
|
||||
* @throws IllegalArgumentException if no {@link FilterType} could be found for the given argument.
|
||||
@@ -222,7 +222,7 @@ public class TypeFilterParser {
|
||||
/**
|
||||
* Returns the {@link Element} if the given {@link Node} is an {@link Element} and it's name equals the one of the
|
||||
* type.
|
||||
*
|
||||
*
|
||||
* @param node
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2017 the original author or authors.
|
||||
* Copyright 2015-2018 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.
|
||||
@@ -447,7 +447,7 @@ public class ClassGeneratingEntityInstantiator implements EntityInstantiator {
|
||||
|
||||
/**
|
||||
* Insert not-{@literal null} assertion for a parameter.
|
||||
*
|
||||
*
|
||||
* @param mv the method visitor into which instructions should be inserted
|
||||
* @param parameterName name of the parameter to create the appropriate assertion message.
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2017 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2017 the original author or authors.
|
||||
* Copyright 2017-2018 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.
|
||||
@@ -27,7 +27,7 @@ import org.springframework.util.Assert;
|
||||
* API to easily set up {@link GenericConverter} instances using Java 8 lambdas, mostly in bidirectional fashion for
|
||||
* easy registration as custom type converters of the Spring Data mapping subsystem. The registration starts either with
|
||||
* the definition of a reading or writing converter that can then be completed.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 2.0
|
||||
* @see #reading(Class, Class, Function)
|
||||
@@ -39,7 +39,7 @@ public interface ConverterBuilder {
|
||||
/**
|
||||
* Creates a new {@link ReadingConverterBuilder} to produce a converter to read values of the given source (the store
|
||||
* type) into the given target (the domain type).
|
||||
*
|
||||
*
|
||||
* @param source must not be {@literal null}.
|
||||
* @param target must not be {@literal null}.
|
||||
* @param function must not be {@literal null}.
|
||||
@@ -58,7 +58,7 @@ public interface ConverterBuilder {
|
||||
/**
|
||||
* Creates a new {@link WritingConverterBuilder} to produce a converter to write values of the given source (the
|
||||
* domain type) into the given target (the store type).
|
||||
*
|
||||
*
|
||||
* @param source must not be {@literal null}.
|
||||
* @param target must not be {@literal null}.
|
||||
* @param function must not be {@literal null}.
|
||||
@@ -76,7 +76,7 @@ public interface ConverterBuilder {
|
||||
|
||||
/**
|
||||
* Returns all {@link GenericConverter} instances to be registered for the current {@link ConverterBuilder}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Set<GenericConverter> getConverters();
|
||||
@@ -91,7 +91,7 @@ public interface ConverterBuilder {
|
||||
|
||||
/**
|
||||
* Returns the writing converter already created.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
GenericConverter getWritingConverter();
|
||||
@@ -107,7 +107,7 @@ public interface ConverterBuilder {
|
||||
|
||||
/**
|
||||
* Returns the reading converter already created.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
GenericConverter getReadingConverter();
|
||||
@@ -123,7 +123,7 @@ public interface ConverterBuilder {
|
||||
|
||||
/**
|
||||
* Creates a new {@link ConverterAware} by registering the given {@link Function} to add a write converter.
|
||||
*
|
||||
*
|
||||
* @param function must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -140,7 +140,7 @@ public interface ConverterBuilder {
|
||||
|
||||
/**
|
||||
* Creates a new {@link ConverterAware} by registering the given {@link Function} to add a write converter.
|
||||
*
|
||||
*
|
||||
* @param function must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2017 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2017 the original author or authors.
|
||||
* Copyright 2017-2018 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.
|
||||
@@ -42,7 +42,7 @@ import org.springframework.lang.Nullable;
|
||||
/**
|
||||
* Builder to easily set up (bi-directional) {@link Converter} instances for Spring Data type mapping using Lambdas. Use
|
||||
* factory methods on {@link ConverterBuilder} to create instances of this class.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 2.0
|
||||
* @see ConverterBuilder#writing(Class, Class, Function)
|
||||
@@ -58,7 +58,7 @@ class DefaultConverterBuilder<S, T>
|
||||
private final @NonNull Optional<Function<? super S, ? extends T>> writing;
|
||||
private final @NonNull Optional<Function<? super T, ? extends S>> reading;
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.convert.WritingConverterBuilder#andReading(java.util.function.Function)
|
||||
*/
|
||||
@@ -67,7 +67,7 @@ class DefaultConverterBuilder<S, T>
|
||||
return withReading(Optional.of(function));
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.convert.ReadingConverterBuilder#andWriting(java.util.function.Function)
|
||||
*/
|
||||
@@ -76,7 +76,7 @@ class DefaultConverterBuilder<S, T>
|
||||
return withWriting(Optional.of(function));
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.convert.ReadingConverterBuilder#getRequiredReadingConverter()
|
||||
*/
|
||||
@@ -86,7 +86,7 @@ class DefaultConverterBuilder<S, T>
|
||||
.orElseThrow(() -> new IllegalStateException("No reading converter specified!"));
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.convert.WritingConverterBuilder#getRequiredWritingConverter()
|
||||
*/
|
||||
@@ -127,7 +127,7 @@ class DefaultConverterBuilder<S, T>
|
||||
private final ConvertiblePair convertiblePair;
|
||||
private final Function<? super S, ? extends T> function;
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.core.convert.converter.GenericConverter#convert(java.lang.Object, org.springframework.core.convert.TypeDescriptor, org.springframework.core.convert.TypeDescriptor)
|
||||
*/
|
||||
@@ -138,7 +138,7 @@ class DefaultConverterBuilder<S, T>
|
||||
return function.apply((S) source);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.core.convert.converter.GenericConverter#getConvertibleTypes()
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2017 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2012 the original author or authors.
|
||||
* Copyright 2011-2018 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,7 +23,7 @@ import org.springframework.data.mapping.context.MappingContext;
|
||||
/**
|
||||
* Combined {@link EntityReader} and {@link EntityWriter} and add the ability to access a {@link MappingContext} and
|
||||
* {@link ConversionService}.
|
||||
*
|
||||
*
|
||||
* @param <E> the concrete {@link PersistentEntity} implementation the converter is based on.
|
||||
* @param <P> the concrete {@link PersistentProperty} implementation the converter is based on.
|
||||
* @param <T> the most common type the {@link EntityConverter} can actually convert.
|
||||
@@ -35,14 +35,14 @@ public interface EntityConverter<E extends PersistentEntity<?, P>, P extends Per
|
||||
|
||||
/**
|
||||
* Returns the underlying {@link MappingContext} used by the converter.
|
||||
*
|
||||
*
|
||||
* @return never {@literal null}
|
||||
*/
|
||||
MappingContext<? extends E, P> getMappingContext();
|
||||
|
||||
/**
|
||||
* Returns the underlying {@link ConversionService} used by the converter.
|
||||
*
|
||||
*
|
||||
* @return never {@literal null}.
|
||||
*/
|
||||
ConversionService getConversionService();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2013 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -21,14 +21,14 @@ import org.springframework.data.mapping.model.ParameterValueProvider;
|
||||
|
||||
/**
|
||||
* SPI to abstract strategies to create instances for {@link PersistentEntity}s.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public interface EntityInstantiator {
|
||||
|
||||
/**
|
||||
* Creates a new instance of the given entity using the given source to pull data from.
|
||||
*
|
||||
*
|
||||
* @param entity will not be {@literal null}.
|
||||
* @param provider will not be {@literal null}.
|
||||
* @return
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2011 by the original author(s).
|
||||
* Copyright 2011-2018 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,
|
||||
@@ -17,14 +17,14 @@ package org.springframework.data.convert;
|
||||
|
||||
/**
|
||||
* Interface to read object from store specific sources.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public interface EntityReader<T, S> {
|
||||
|
||||
/**
|
||||
* Reads the given source into the given type.
|
||||
*
|
||||
*
|
||||
* @param type they type to convert the given source to.
|
||||
* @param source the source to create an object of the given type from.
|
||||
* @return
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2011 by the original author(s).
|
||||
* Copyright 2011-2018 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,
|
||||
@@ -17,7 +17,7 @@ package org.springframework.data.convert;
|
||||
|
||||
/**
|
||||
* Interface to write objects into store specific sinks.
|
||||
*
|
||||
*
|
||||
* @param <T> the entity type the converter can handle
|
||||
* @param <S> the store specific sink the converter is able to write to
|
||||
* @author Oliver Gierke
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2017 the original author or authors.
|
||||
* Copyright 2013-2018 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2017 the original author or authors.
|
||||
* Copyright 2013-2018 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.
|
||||
@@ -40,7 +40,7 @@ import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
* Helper class to register JSR-310 specific {@link Converter} implementations in case the we're running on Java 8.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Barak Schoster
|
||||
* @author Christoph Strobl
|
||||
@@ -52,7 +52,7 @@ public abstract class Jsr310Converters {
|
||||
|
||||
/**
|
||||
* Returns the converters to be registered. Will only return converters in case we're running on Java 8.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Collection<Converter<?, ?>> getConvertersToRegister() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2017 the original author or authors.
|
||||
* Copyright 2017-2018 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2017 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
@@ -27,7 +27,7 @@ import org.springframework.core.convert.converter.Converter;
|
||||
/**
|
||||
* Annotation to clarify intended usage of a {@link Converter} as reading converter in case the conversion types leave
|
||||
* room for disambiguation.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@Target(TYPE)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2017 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2017 the original author or authors.
|
||||
* Copyright 2015-2018 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.
|
||||
@@ -40,7 +40,7 @@ import org.threeten.bp.ZoneId;
|
||||
/**
|
||||
* Helper class to register {@link Converter} implementations for the ThreeTen Backport project in case it's present on
|
||||
* the classpath.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Christoph Strobl
|
||||
* @see <a href="http://www.threeten.org/threetenbp">http://www.threeten.org/threetenbp</a>
|
||||
@@ -53,7 +53,7 @@ public abstract class ThreeTenBackPortConverters {
|
||||
|
||||
/**
|
||||
* Returns the converters to be registered. Will only return converters in case we're running on Java 8.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Collection<Converter<?, ?>> getConvertersToRegister() {
|
||||
@@ -93,7 +93,7 @@ public abstract class ThreeTenBackPortConverters {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
@@ -19,14 +19,14 @@ import org.springframework.data.mapping.Alias;
|
||||
|
||||
/**
|
||||
* Interface to abstract implementations of how to access a type alias from a given source or sink.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public interface TypeAliasAccessor<S> {
|
||||
|
||||
/**
|
||||
* Reads the type alias to be used from the given source.
|
||||
*
|
||||
*
|
||||
* @param source
|
||||
* @return can be {@literal null} in case no alias was found.
|
||||
*/
|
||||
@@ -34,7 +34,7 @@ public interface TypeAliasAccessor<S> {
|
||||
|
||||
/**
|
||||
* Writes the given type alias to the given sink.
|
||||
*
|
||||
*
|
||||
* @param sink
|
||||
* @param alias
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2017 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2017 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
@@ -27,7 +27,7 @@ import org.springframework.core.convert.converter.Converter;
|
||||
/**
|
||||
* Annotation to clarify intended usage of a {@link Converter} as writing converter in case the conversion types leave
|
||||
* room for disambiguation.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@Target(TYPE)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011 the original author or authors.
|
||||
* Copyright 2011-2018 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,7 +23,7 @@ import org.springframework.core.convert.ConversionService;
|
||||
|
||||
/**
|
||||
* Interface representing the set of changes in an entity.
|
||||
*
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @author Thomas Risberg
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
@@ -17,7 +17,7 @@ package org.springframework.data.crossstore;
|
||||
|
||||
/**
|
||||
* Interface introduced to objects exposing ChangeSet information
|
||||
*
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @author Thomas Risberg
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
@@ -19,7 +19,7 @@ import org.springframework.dao.DataAccessException;
|
||||
|
||||
/**
|
||||
* Interface to be implemented by classes that can synchronize between data stores and ChangeSets.
|
||||
*
|
||||
*
|
||||
* @param <K> entity key
|
||||
* @author Rod Johnson
|
||||
*/
|
||||
@@ -36,7 +36,7 @@ public interface ChangeSetPersister<K> {
|
||||
|
||||
/**
|
||||
* Return id
|
||||
*
|
||||
*
|
||||
* @param entity
|
||||
* @param cs
|
||||
* @return
|
||||
@@ -46,7 +46,7 @@ public interface ChangeSetPersister<K> {
|
||||
|
||||
/**
|
||||
* Return key
|
||||
*
|
||||
*
|
||||
* @param entity
|
||||
* @param cs Key may be null if not persistent
|
||||
* @return
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016-2017 the original author or authors.
|
||||
* Copyright 2016-2018 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.
|
||||
@@ -28,7 +28,7 @@ import org.springframework.util.Assert;
|
||||
* expose them via {@link #domainEvents())}. The implementation is using the general event publication mechanism implied
|
||||
* by {@link DomainEvents} and {@link AfterDomainEventPublication}. If in doubt or need to customize anything here,
|
||||
* rather build your own base class and use the annotations directly.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Christoph Strobl
|
||||
* @since 1.13
|
||||
@@ -39,7 +39,7 @@ public class AbstractAggregateRoot<A extends AbstractAggregateRoot<A>> {
|
||||
|
||||
/**
|
||||
* Registers the given event object for publication on a call to a Spring Data repository's save methods.
|
||||
*
|
||||
*
|
||||
* @param event must not be {@literal null}.
|
||||
* @return the event that has been added.
|
||||
* @see #andEvent(Object)
|
||||
@@ -71,7 +71,7 @@ public class AbstractAggregateRoot<A extends AbstractAggregateRoot<A>> {
|
||||
|
||||
/**
|
||||
* Adds all events contained in the given aggregate to the current one.
|
||||
*
|
||||
*
|
||||
* @param aggregate must not be {@literal null}.
|
||||
* @return the aggregate
|
||||
*/
|
||||
@@ -88,7 +88,7 @@ public class AbstractAggregateRoot<A extends AbstractAggregateRoot<A>> {
|
||||
/**
|
||||
* Adds the given event to the aggregate for later publication when calling a Spring Data repository's save-method.
|
||||
* Does the same as {@link #registerEvent(Object)} but returns the aggregate instead of the event.
|
||||
*
|
||||
*
|
||||
* @param event must not be {@literal null}.
|
||||
* @return the aggregate
|
||||
* @see #registerEvent(Object)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013 the original author or authors.
|
||||
* Copyright 2013-2018 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.
|
||||
@@ -21,7 +21,7 @@ import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Abstract Java Bean implementation of {@code Pageable}.
|
||||
*
|
||||
*
|
||||
* @author Thomas Darimont
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@@ -35,7 +35,7 @@ public abstract class AbstractPageRequest implements Pageable, Serializable {
|
||||
/**
|
||||
* Creates a new {@link AbstractPageRequest}. Pages are zero indexed, thus providing 0 for {@code page} will return
|
||||
* the first page.
|
||||
*
|
||||
*
|
||||
* @param page must not be less than zero.
|
||||
* @param size must not be less than one.
|
||||
*/
|
||||
@@ -53,7 +53,7 @@ public abstract class AbstractPageRequest implements Pageable, Serializable {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.domain.Pageable#getPageSize()
|
||||
*/
|
||||
@@ -61,7 +61,7 @@ public abstract class AbstractPageRequest implements Pageable, Serializable {
|
||||
return size;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.domain.Pageable#getPageNumber()
|
||||
*/
|
||||
@@ -69,7 +69,7 @@ public abstract class AbstractPageRequest implements Pageable, Serializable {
|
||||
return page;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.domain.Pageable#getOffset()
|
||||
*/
|
||||
@@ -77,7 +77,7 @@ public abstract class AbstractPageRequest implements Pageable, Serializable {
|
||||
return page * size;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.domain.Pageable#hasPrevious()
|
||||
*/
|
||||
@@ -85,7 +85,7 @@ public abstract class AbstractPageRequest implements Pageable, Serializable {
|
||||
return page > 0;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.domain.Pageable#previousOrFirst()
|
||||
*/
|
||||
@@ -93,7 +93,7 @@ public abstract class AbstractPageRequest implements Pageable, Serializable {
|
||||
return hasPrevious() ? previous() : first();
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.domain.Pageable#next()
|
||||
*/
|
||||
@@ -101,18 +101,18 @@ public abstract class AbstractPageRequest implements Pageable, Serializable {
|
||||
|
||||
/**
|
||||
* Returns the {@link Pageable} requesting the previous {@link Page}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract Pageable previous();
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.domain.Pageable#first()
|
||||
*/
|
||||
public abstract Pageable first();
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@@ -128,7 +128,7 @@ public abstract class AbstractPageRequest implements Pageable, Serializable {
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016 the original author or authors.
|
||||
* Copyright 2016-2018 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,7 +23,7 @@ import java.lang.annotation.Target;
|
||||
/**
|
||||
* Annotation to be used on a method of a Spring Data managed aggregate to get invoked after the events of an aggregate
|
||||
* have been published.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @see DomainEvents
|
||||
* @since 1.13
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008-2010 the original author or authors.
|
||||
* Copyright 2008-2018 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.
|
||||
@@ -21,7 +21,7 @@ import java.util.Optional;
|
||||
/**
|
||||
* Interface for auditable entities. Allows storing and retrieving creation and modification information. The changing
|
||||
* instance (typically some user) is to be defined by a generics definition.
|
||||
*
|
||||
*
|
||||
* @param <U> the auditing type. Typically some kind of user.
|
||||
* @param <ID> the type of the audited type's identifier
|
||||
* @author Oliver Gierke
|
||||
@@ -30,56 +30,56 @@ public interface Auditable<U, ID, T extends TemporalAccessor> extends Persistabl
|
||||
|
||||
/**
|
||||
* Returns the user who created this entity.
|
||||
*
|
||||
*
|
||||
* @return the createdBy
|
||||
*/
|
||||
Optional<U> getCreatedBy();
|
||||
|
||||
/**
|
||||
* Sets the user who created this entity.
|
||||
*
|
||||
*
|
||||
* @param createdBy the creating entity to set
|
||||
*/
|
||||
void setCreatedBy(U createdBy);
|
||||
|
||||
/**
|
||||
* Returns the creation date of the entity.
|
||||
*
|
||||
*
|
||||
* @return the createdDate
|
||||
*/
|
||||
Optional<T> getCreatedDate();
|
||||
|
||||
/**
|
||||
* Sets the creation date of the entity.
|
||||
*
|
||||
*
|
||||
* @param creationDate the creation date to set
|
||||
*/
|
||||
void setCreatedDate(T creationDate);
|
||||
|
||||
/**
|
||||
* Returns the user who modified the entity lastly.
|
||||
*
|
||||
*
|
||||
* @return the lastModifiedBy
|
||||
*/
|
||||
Optional<U> getLastModifiedBy();
|
||||
|
||||
/**
|
||||
* Sets the user who modified the entity lastly.
|
||||
*
|
||||
*
|
||||
* @param lastModifiedBy the last modifying entity to set
|
||||
*/
|
||||
void setLastModifiedBy(U lastModifiedBy);
|
||||
|
||||
/**
|
||||
* Returns the date of the last modification.
|
||||
*
|
||||
*
|
||||
* @return the lastModifiedDate
|
||||
*/
|
||||
Optional<T> getLastModifiedDate();
|
||||
|
||||
/**
|
||||
* Sets the date of the last modification.
|
||||
*
|
||||
*
|
||||
* @param lastModifiedDate the date of the last modification to set
|
||||
*/
|
||||
void setLastModifiedDate(T lastModifiedDate);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008-2010 the original author or authors.
|
||||
* Copyright 2008-2018 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.
|
||||
@@ -19,7 +19,7 @@ import java.util.Optional;
|
||||
|
||||
/**
|
||||
* Interface for components that are aware of the application's current auditor. This will be some kind of user mostly.
|
||||
*
|
||||
*
|
||||
* @param <T> the type of the auditing instance
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@@ -27,7 +27,7 @@ public interface AuditorAware<T> {
|
||||
|
||||
/**
|
||||
* Returns the current auditor of the application.
|
||||
*
|
||||
*
|
||||
* @return the current auditor
|
||||
*/
|
||||
Optional<T> getCurrentAuditor();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2017 the original author or authors.
|
||||
* Copyright 2014-2018 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.
|
||||
@@ -30,7 +30,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* A chunk of data restricted by the configured {@link Pageable}.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Christoph Strobl
|
||||
* @since 1.8
|
||||
@@ -44,7 +44,7 @@ abstract class Chunk<T> implements Slice<T>, Serializable {
|
||||
|
||||
/**
|
||||
* Creates a new {@link Chunk} with the given content and the given governing {@link Pageable}.
|
||||
*
|
||||
*
|
||||
* @param content must not be {@literal null}.
|
||||
* @param pageable must not be {@literal null}.
|
||||
*/
|
||||
@@ -105,7 +105,7 @@ abstract class Chunk<T> implements Slice<T>, Serializable {
|
||||
return !hasNext();
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.domain.Slice#nextPageable()
|
||||
*/
|
||||
@@ -156,7 +156,7 @@ abstract class Chunk<T> implements Slice<T>, Serializable {
|
||||
|
||||
/**
|
||||
* Applies the given {@link Function} to the content of the {@link Chunk}.
|
||||
*
|
||||
*
|
||||
* @param converter must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016 the original author or authors.
|
||||
* Copyright 2016-2018 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,7 +23,7 @@ import java.lang.annotation.Target;
|
||||
/**
|
||||
* {@link DomainEvents} can be used on methods of aggregate roots managed by Spring Data repositories to publish the
|
||||
* events returned by that method as Spring application events.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @see org.springframework.context.ApplicationEventPublisher
|
||||
* @see AfterDomainEventPublication
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016 the original author or authors.
|
||||
* Copyright 2016-2018 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016-2017 the original author or authors.
|
||||
* Copyright 2016-2018 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008-2017 the original author or authors.
|
||||
* Copyright 2008-2018 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.
|
||||
@@ -21,7 +21,7 @@ import java.util.function.Function;
|
||||
/**
|
||||
* A page is a sublist of a list of objects. It allows gain information about the position of it in the containing
|
||||
* entire list.
|
||||
*
|
||||
*
|
||||
* @param <T>
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@@ -29,7 +29,7 @@ public interface Page<T> extends Slice<T> {
|
||||
|
||||
/**
|
||||
* Creates a new empty {@link Page}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* @since 2.0
|
||||
*/
|
||||
@@ -39,7 +39,7 @@ public interface Page<T> extends Slice<T> {
|
||||
|
||||
/**
|
||||
* Creates a new empty {@link Page} for the given {@link Pageable}.
|
||||
*
|
||||
*
|
||||
* @param pageable must not be {@literal null}.
|
||||
* @return
|
||||
* @since 2.0
|
||||
@@ -50,21 +50,21 @@ public interface Page<T> extends Slice<T> {
|
||||
|
||||
/**
|
||||
* Returns the number of total pages.
|
||||
*
|
||||
*
|
||||
* @return the number of total pages
|
||||
*/
|
||||
int getTotalPages();
|
||||
|
||||
/**
|
||||
* Returns the total amount of elements.
|
||||
*
|
||||
*
|
||||
* @return the total amount of elements
|
||||
*/
|
||||
long getTotalElements();
|
||||
|
||||
/**
|
||||
* Returns a new {@link Page} with the content of the current one mapped by the given {@link Function}.
|
||||
*
|
||||
*
|
||||
* @param converter must not be {@literal null}.
|
||||
* @return a new {@link Page} with the content of the current one mapped by the given {@link Function}.
|
||||
* @since 1.10
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008-2017 the original author or authors.
|
||||
* Copyright 2008-2018 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.
|
||||
@@ -22,7 +22,7 @@ import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Basic {@code Page} implementation.
|
||||
*
|
||||
*
|
||||
* @param <T> the type of which the page consists.
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@@ -35,7 +35,7 @@ public class PageImpl<T> extends Chunk<T> implements Page<T> {
|
||||
|
||||
/**
|
||||
* Constructor of {@code PageImpl}.
|
||||
*
|
||||
*
|
||||
* @param content the content of this page, must not be {@literal null}.
|
||||
* @param pageable the paging information, can be {@literal null}.
|
||||
* @param total the total amount of items available. The total might be adapted considering the length of the content
|
||||
@@ -55,7 +55,7 @@ public class PageImpl<T> extends Chunk<T> implements Page<T> {
|
||||
/**
|
||||
* Creates a new {@link PageImpl} with the given content. This will result in the created {@link Page} being identical
|
||||
* to the entire {@link List}.
|
||||
*
|
||||
*
|
||||
* @param content must not be {@literal null}.
|
||||
*/
|
||||
public PageImpl(List<T> content) {
|
||||
@@ -80,7 +80,7 @@ public class PageImpl<T> extends Chunk<T> implements Page<T> {
|
||||
return total;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.domain.Slice#hasNext()
|
||||
*/
|
||||
@@ -89,7 +89,7 @@ public class PageImpl<T> extends Chunk<T> implements Page<T> {
|
||||
return getNumber() + 1 < getTotalPages();
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.domain.Slice#isLast()
|
||||
*/
|
||||
@@ -98,7 +98,7 @@ public class PageImpl<T> extends Chunk<T> implements Page<T> {
|
||||
return !hasNext();
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.domain.Slice#transform(org.springframework.core.convert.converter.Converter)
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008-2017 the original author or authors.
|
||||
* Copyright 2008-2018 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008-2017 the original author or authors.
|
||||
* Copyright 2008-2018 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.
|
||||
@@ -21,14 +21,14 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Abstract interface for pagination information.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public interface Pageable {
|
||||
|
||||
/**
|
||||
* Returns a {@link Pageable} instance representing no pagination setup.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
static Pageable unpaged() {
|
||||
@@ -37,7 +37,7 @@ public interface Pageable {
|
||||
|
||||
/**
|
||||
* Returns whether the current {@link Pageable} contains pagination information.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
default boolean isPaged() {
|
||||
@@ -46,7 +46,7 @@ public interface Pageable {
|
||||
|
||||
/**
|
||||
* Returns whether the current {@link Pageable} does not contain pagination information.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
default boolean isUnpaged() {
|
||||
@@ -55,35 +55,35 @@ public interface Pageable {
|
||||
|
||||
/**
|
||||
* Returns the page to be returned.
|
||||
*
|
||||
*
|
||||
* @return the page to be returned.
|
||||
*/
|
||||
int getPageNumber();
|
||||
|
||||
/**
|
||||
* Returns the number of items to be returned.
|
||||
*
|
||||
*
|
||||
* @return the number of items of that page
|
||||
*/
|
||||
int getPageSize();
|
||||
|
||||
/**
|
||||
* Returns the offset to be taken according to the underlying page and page size.
|
||||
*
|
||||
*
|
||||
* @return the offset to be taken
|
||||
*/
|
||||
long getOffset();
|
||||
|
||||
/**
|
||||
* Returns the sorting parameters.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Sort getSort();
|
||||
|
||||
/**
|
||||
* Returns the current {@link Sort} or the given one if the current one is unsorted.
|
||||
*
|
||||
*
|
||||
* @param sort must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -96,21 +96,21 @@ public interface Pageable {
|
||||
|
||||
/**
|
||||
* Returns the {@link Pageable} requesting the next {@link Page}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Pageable next();
|
||||
|
||||
/**
|
||||
* Returns the previous {@link Pageable} or the first {@link Pageable} if the current one already is the first one.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Pageable previousOrFirst();
|
||||
|
||||
/**
|
||||
* Returns the {@link Pageable} requesting the first page.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Pageable first();
|
||||
@@ -118,14 +118,14 @@ public interface Pageable {
|
||||
/**
|
||||
* Returns whether there's a previous {@link Pageable} we can access from the current one. Will return
|
||||
* {@literal false} in case the current {@link Pageable} already refers to the first page.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean hasPrevious();
|
||||
|
||||
/**
|
||||
* Returns an {@link Optional} so that it can easily be mapped on.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
default Optional<Pageable> toOptional() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008-2017 the original author or authors.
|
||||
* Copyright 2008-2018 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.
|
||||
@@ -19,7 +19,7 @@ import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Simple interface for entities.
|
||||
*
|
||||
*
|
||||
* @param <ID> the type of the identifier
|
||||
* @author Oliver Gierke
|
||||
* @author Christoph Strobl
|
||||
@@ -28,7 +28,7 @@ public interface Persistable<ID> {
|
||||
|
||||
/**
|
||||
* Returns the id of the entity.
|
||||
*
|
||||
*
|
||||
* @return the id. Can be {@literal null}.
|
||||
*/
|
||||
@Nullable
|
||||
@@ -36,7 +36,7 @@ public interface Persistable<ID> {
|
||||
|
||||
/**
|
||||
* Returns if the {@code Persistable} is new or was persisted already.
|
||||
*
|
||||
*
|
||||
* @return if {@literal true} the object is new.
|
||||
*/
|
||||
boolean isNew();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2017 the original author or authors.
|
||||
* Copyright 2015-2018 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.
|
||||
@@ -26,7 +26,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Simple value object to work with ranges and boundaries.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Mark Paluch
|
||||
* @since 1.10
|
||||
@@ -50,7 +50,7 @@ public class Range<T extends Comparable<T>> {
|
||||
/**
|
||||
* Creates a new {@link Range} with the given lower and upper bound. Treats the given values as inclusive bounds. Use
|
||||
* {@link #Range(Comparable, Comparable, boolean, boolean)} to configure different bound behavior.
|
||||
*
|
||||
*
|
||||
* @see Range#of(Bound, Bound)
|
||||
* @param lowerBound can be {@literal null} in case upperBound is not {@literal null}.
|
||||
* @param upperBound can be {@literal null} in case lowerBound is not {@literal null}.
|
||||
@@ -64,7 +64,7 @@ public class Range<T extends Comparable<T>> {
|
||||
/**
|
||||
* Creates a new {@link Range} with the given lower and upper bound as well as the given inclusive/exclusive
|
||||
* semantics.
|
||||
*
|
||||
*
|
||||
* @param lowerBound can be {@literal null}.
|
||||
* @param upperBound can be {@literal null}.
|
||||
* @param lowerInclusive
|
||||
@@ -84,7 +84,7 @@ public class Range<T extends Comparable<T>> {
|
||||
|
||||
/**
|
||||
* Returns an unbounded {@link Range}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* @since 2.0
|
||||
*/
|
||||
@@ -95,7 +95,7 @@ public class Range<T extends Comparable<T>> {
|
||||
|
||||
/**
|
||||
* Create a {@link RangeBuilder} given the lower {@link Bound}.
|
||||
*
|
||||
*
|
||||
* @param lower must not be {@literal null}.
|
||||
* @return
|
||||
* @since 2.0
|
||||
@@ -108,7 +108,7 @@ public class Range<T extends Comparable<T>> {
|
||||
|
||||
/**
|
||||
* Creates a new {@link Range} with the given lower and upper bound.
|
||||
*
|
||||
*
|
||||
* @param lowerBound must not be {@literal null}.
|
||||
* @param upperBound must not be {@literal null}.
|
||||
* @since 2.0
|
||||
@@ -137,7 +137,7 @@ public class Range<T extends Comparable<T>> {
|
||||
|
||||
/**
|
||||
* Returns whether the {@link Range} contains the given value.
|
||||
*
|
||||
*
|
||||
* @param value must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -156,7 +156,7 @@ public class Range<T extends Comparable<T>> {
|
||||
return greaterThanLowerBound && lessThanUpperBound;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@@ -168,7 +168,7 @@ public class Range<T extends Comparable<T>> {
|
||||
/**
|
||||
* Value object representing a boundary. A boundary can either be {@link #unbounded() unbounded},
|
||||
* {@link #inclusive(Comparable) including its value} or {@link #exclusive(Comparable) its value}.
|
||||
*
|
||||
*
|
||||
* @author Mark Paluch
|
||||
* @since 2.0
|
||||
* @soundtrack Mohamed Ragab - Excelsior Sessions (March 2017)
|
||||
@@ -193,7 +193,7 @@ public class Range<T extends Comparable<T>> {
|
||||
|
||||
/**
|
||||
* Returns whether this boundary is bounded.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isBounded() {
|
||||
@@ -202,7 +202,7 @@ public class Range<T extends Comparable<T>> {
|
||||
|
||||
/**
|
||||
* Creates a boundary including {@code value}.
|
||||
*
|
||||
*
|
||||
* @param value must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -214,7 +214,7 @@ public class Range<T extends Comparable<T>> {
|
||||
|
||||
/**
|
||||
* Creates a boundary including {@code value}.
|
||||
*
|
||||
*
|
||||
* @param value must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -224,7 +224,7 @@ public class Range<T extends Comparable<T>> {
|
||||
|
||||
/**
|
||||
* Creates a boundary including {@code value}.
|
||||
*
|
||||
*
|
||||
* @param value must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -234,7 +234,7 @@ public class Range<T extends Comparable<T>> {
|
||||
|
||||
/**
|
||||
* Creates a boundary including {@code value}.
|
||||
*
|
||||
*
|
||||
* @param value must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -244,7 +244,7 @@ public class Range<T extends Comparable<T>> {
|
||||
|
||||
/**
|
||||
* Creates a boundary including {@code value}.
|
||||
*
|
||||
*
|
||||
* @param value must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -254,7 +254,7 @@ public class Range<T extends Comparable<T>> {
|
||||
|
||||
/**
|
||||
* Creates a boundary excluding {@code value}.
|
||||
*
|
||||
*
|
||||
* @param value must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -266,7 +266,7 @@ public class Range<T extends Comparable<T>> {
|
||||
|
||||
/**
|
||||
* Creates a boundary excluding {@code value}.
|
||||
*
|
||||
*
|
||||
* @param value must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -276,7 +276,7 @@ public class Range<T extends Comparable<T>> {
|
||||
|
||||
/**
|
||||
* Creates a boundary excluding {@code value}.
|
||||
*
|
||||
*
|
||||
* @param value must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -286,7 +286,7 @@ public class Range<T extends Comparable<T>> {
|
||||
|
||||
/**
|
||||
* Creates a boundary excluding {@code value}.
|
||||
*
|
||||
*
|
||||
* @param value must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -296,7 +296,7 @@ public class Range<T extends Comparable<T>> {
|
||||
|
||||
/**
|
||||
* Creates a boundary excluding {@code value}.
|
||||
*
|
||||
*
|
||||
* @param value must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -320,7 +320,7 @@ public class Range<T extends Comparable<T>> {
|
||||
.orElse("unbounded");
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@@ -348,7 +348,7 @@ public class Range<T extends Comparable<T>> {
|
||||
|
||||
/**
|
||||
* Create a {@link Range} given the upper {@link Bound}.
|
||||
*
|
||||
*
|
||||
* @param upper must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2015 the original author or authors.
|
||||
* Copyright 2014-2018 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.
|
||||
@@ -24,7 +24,7 @@ import org.springframework.data.util.Streamable;
|
||||
/**
|
||||
* A slice of data that indicates whether there's a next or previous slice available. Allows to obtain a
|
||||
* {@link Pageable} to request a previous or next {@link Slice}.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.8
|
||||
*/
|
||||
@@ -32,77 +32,77 @@ public interface Slice<T> extends Streamable<T> {
|
||||
|
||||
/**
|
||||
* Returns the number of the current {@link Slice}. Is always non-negative.
|
||||
*
|
||||
*
|
||||
* @return the number of the current {@link Slice}.
|
||||
*/
|
||||
int getNumber();
|
||||
|
||||
/**
|
||||
* Returns the size of the {@link Slice}.
|
||||
*
|
||||
*
|
||||
* @return the size of the {@link Slice}.
|
||||
*/
|
||||
int getSize();
|
||||
|
||||
/**
|
||||
* Returns the number of elements currently on this {@link Slice}.
|
||||
*
|
||||
*
|
||||
* @return the number of elements currently on this {@link Slice}.
|
||||
*/
|
||||
int getNumberOfElements();
|
||||
|
||||
/**
|
||||
* Returns the page content as {@link List}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<T> getContent();
|
||||
|
||||
/**
|
||||
* Returns whether the {@link Slice} has content at all.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean hasContent();
|
||||
|
||||
/**
|
||||
* Returns the sorting parameters for the {@link Slice}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Sort getSort();
|
||||
|
||||
/**
|
||||
* Returns whether the current {@link Slice} is the first one.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isFirst();
|
||||
|
||||
/**
|
||||
* Returns whether the current {@link Slice} is the last one.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isLast();
|
||||
|
||||
/**
|
||||
* Returns if there is a next {@link Slice}.
|
||||
*
|
||||
*
|
||||
* @return if there is a next {@link Slice}.
|
||||
*/
|
||||
boolean hasNext();
|
||||
|
||||
/**
|
||||
* Returns if there is a previous {@link Slice}.
|
||||
*
|
||||
*
|
||||
* @return if there is a previous {@link Slice}.
|
||||
*/
|
||||
boolean hasPrevious();
|
||||
|
||||
/**
|
||||
* Returns the {@link Pageable} that's been used to request the current {@link Slice}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* @since 2.0
|
||||
*/
|
||||
@@ -114,7 +114,7 @@ public interface Slice<T> extends Streamable<T> {
|
||||
* Returns the {@link Pageable} to request the next {@link Slice}. Can be {@literal null} in case the current
|
||||
* {@link Slice} is already the last one. Clients should check {@link #hasNext()} before calling this method to make
|
||||
* sure they receive a non-{@literal null} value.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Pageable nextPageable();
|
||||
@@ -123,14 +123,14 @@ public interface Slice<T> extends Streamable<T> {
|
||||
* Returns the {@link Pageable} to request the previous {@link Slice}. Can be {@literal null} in case the current
|
||||
* {@link Slice} is already the first one. Clients should check {@link #hasPrevious()} before calling this method make
|
||||
* sure receive a non-{@literal null} value.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Pageable previousPageable();
|
||||
|
||||
/**
|
||||
* Returns a new {@link Slice} with the content of the current one mapped by the given {@link Converter}.
|
||||
*
|
||||
*
|
||||
* @param converter must not be {@literal null}.
|
||||
* @return a new {@link Slice} with the content of the current one mapped by the given {@link Converter}.
|
||||
* @since 1.10
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
* Copyright 2014-2018 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.
|
||||
@@ -22,7 +22,7 @@ import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Default implementation of {@link Slice}.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.8
|
||||
*/
|
||||
@@ -35,7 +35,7 @@ public class SliceImpl<T> extends Chunk<T> {
|
||||
|
||||
/**
|
||||
* Creates a new {@link Slice} with the given content and {@link Pageable}.
|
||||
*
|
||||
*
|
||||
* @param content the content of this {@link Slice}, must not be {@literal null}.
|
||||
* @param pageable the paging information, can be {@literal null}.
|
||||
* @param hasNext whether there's another slice following the current one.
|
||||
@@ -51,7 +51,7 @@ public class SliceImpl<T> extends Chunk<T> {
|
||||
/**
|
||||
* Creates a new {@link SliceImpl} with the given content. This will result in the created {@link Slice} being
|
||||
* identical to the entire {@link List}.
|
||||
*
|
||||
*
|
||||
* @param content must not be {@literal null}.
|
||||
*/
|
||||
public SliceImpl(List<T> content) {
|
||||
@@ -66,7 +66,7 @@ public class SliceImpl<T> extends Chunk<T> {
|
||||
return hasNext;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.domain.Slice#transform(org.springframework.core.convert.converter.Converter)
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008-2017 the original author or authors.
|
||||
* Copyright 2008-2018 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.
|
||||
@@ -33,7 +33,7 @@ import org.springframework.util.StringUtils;
|
||||
/**
|
||||
* Sort option for queries. You have to provide at least a list of properties to sort for that must not include
|
||||
* {@literal null} or empty strings. The direction defaults to {@link Sort#DEFAULT_DIRECTION}.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
* @author Mark Paluch
|
||||
@@ -50,7 +50,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Creates a new {@link Sort} instance using the given {@link Order}s.
|
||||
*
|
||||
*
|
||||
* @param orders must not be {@literal null}.
|
||||
*/
|
||||
@Deprecated
|
||||
@@ -60,7 +60,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Creates a new {@link Sort} instance.
|
||||
*
|
||||
*
|
||||
* @param orders must not be {@literal null} or contain {@literal null}.
|
||||
* @deprecated see {@link Sort#by(List)}
|
||||
*/
|
||||
@@ -74,7 +74,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Creates a new {@link Sort} instance. Order defaults to {@value Direction#ASC}.
|
||||
*
|
||||
*
|
||||
* @param properties must not be {@literal null} or contain {@literal null} or empty strings
|
||||
* @deprecated use {@link Sort#by(String...)}
|
||||
*/
|
||||
@@ -85,7 +85,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Creates a new {@link Sort} instance.
|
||||
*
|
||||
*
|
||||
* @param direction defaults to {@link Sort#DEFAULT_DIRECTION} (for {@literal null} cases, too)
|
||||
* @param properties must not be {@literal null}, empty or contain {@literal null} or empty strings.
|
||||
*/
|
||||
@@ -95,7 +95,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Creates a new {@link Sort} instance.
|
||||
*
|
||||
*
|
||||
* @param direction defaults to {@link Sort#DEFAULT_DIRECTION} (for {@literal null} cases, too)
|
||||
* @param properties must not be {@literal null} or contain {@literal null} or empty strings.
|
||||
*/
|
||||
@@ -114,7 +114,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Creates a new {@link Sort} for the given properties.
|
||||
*
|
||||
*
|
||||
* @param properties must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -127,7 +127,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Creates a new {@link Sort} for the given {@link Order}s.
|
||||
*
|
||||
*
|
||||
* @param orders must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -140,7 +140,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Creates a new {@link Sort} for the given {@link Order}s.
|
||||
*
|
||||
*
|
||||
* @param orders must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -153,7 +153,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Creates a new {@link Sort} for the given {@link Order}s.
|
||||
*
|
||||
*
|
||||
* @param direction must not be {@literal null}.
|
||||
* @param properties must not be {@literal null}.
|
||||
* @return
|
||||
@@ -171,7 +171,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns a {@link Sort} instances representing no sorting setup at all.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Sort unsorted() {
|
||||
@@ -180,7 +180,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns a new {@link Sort} with the current setup but descending order direction.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Sort descending() {
|
||||
@@ -189,7 +189,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns a new {@link Sort} with the current setup but ascending order direction.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Sort ascending() {
|
||||
@@ -207,7 +207,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
/**
|
||||
* Returns a new {@link Sort} consisting of the {@link Order}s of the current {@link Sort} combined with the given
|
||||
* ones.
|
||||
*
|
||||
*
|
||||
* @param sort must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -226,7 +226,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns the order registered for the given property.
|
||||
*
|
||||
*
|
||||
* @param property
|
||||
* @return
|
||||
*/
|
||||
@@ -293,7 +293,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Creates a new {@link Sort} with the current setup but the given order direction.
|
||||
*
|
||||
*
|
||||
* @param direction
|
||||
* @return
|
||||
*/
|
||||
@@ -304,7 +304,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Enumeration for sort directions.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public static enum Direction {
|
||||
@@ -313,7 +313,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns whether the direction is ascending.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* @since 1.13
|
||||
*/
|
||||
@@ -323,7 +323,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns whether the direction is descending.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* @since 1.13
|
||||
*/
|
||||
@@ -333,7 +333,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns the {@link Direction} enum for the given {@link String} value.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* @throws IllegalArgumentException in case the given value cannot be parsed into an enum value.
|
||||
* @return
|
||||
@@ -351,7 +351,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
/**
|
||||
* Returns the {@link Direction} enum for the given {@link String} or null if it cannot be parsed into an enum
|
||||
* value.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
@@ -367,7 +367,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Enumeration for null handling hints that can be used in {@link Order} expressions.
|
||||
*
|
||||
*
|
||||
* @author Thomas Darimont
|
||||
* @since 1.8
|
||||
*/
|
||||
@@ -392,7 +392,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
/**
|
||||
* PropertyPath implements the pairing of an {@link Direction} and a property. It is used to provide input for
|
||||
* {@link Sort}
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Kevin Raymond
|
||||
*/
|
||||
@@ -410,7 +410,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
/**
|
||||
* Creates a new {@link Order} instance. if order is {@literal null} then order defaults to
|
||||
* {@link Sort#DEFAULT_DIRECTION}
|
||||
*
|
||||
*
|
||||
* @param direction can be {@literal null}, will default to {@link Sort#DEFAULT_DIRECTION}
|
||||
* @param property must not be {@literal null} or empty.
|
||||
*/
|
||||
@@ -421,7 +421,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
/**
|
||||
* Creates a new {@link Order} instance. if order is {@literal null} then order defaults to
|
||||
* {@link Sort#DEFAULT_DIRECTION}
|
||||
*
|
||||
*
|
||||
* @param direction can be {@literal null}, will default to {@link Sort#DEFAULT_DIRECTION}
|
||||
* @param property must not be {@literal null} or empty.
|
||||
* @param nullHandling must not be {@literal null}.
|
||||
@@ -433,7 +433,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
/**
|
||||
* Creates a new {@link Order} instance. Takes a single property. Direction defaults to
|
||||
* {@link Sort#DEFAULT_DIRECTION}.
|
||||
*
|
||||
*
|
||||
* @param property must not be {@literal null} or empty.
|
||||
* @deprecated since 2.0, use {@link Order#by(String)}.
|
||||
*/
|
||||
@@ -445,7 +445,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
/**
|
||||
* Creates a new {@link Order} instance. Takes a single property. Direction defaults to
|
||||
* {@link Sort#DEFAULT_DIRECTION}.
|
||||
*
|
||||
*
|
||||
* @param property must not be {@literal null} or empty.
|
||||
* @since 2.0
|
||||
*/
|
||||
@@ -478,7 +478,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
/**
|
||||
* Creates a new {@link Order} instance. if order is {@literal null} then order defaults to
|
||||
* {@link Sort#DEFAULT_DIRECTION}
|
||||
*
|
||||
*
|
||||
* @param direction can be {@literal null}, will default to {@link Sort#DEFAULT_DIRECTION}
|
||||
* @param property must not be {@literal null} or empty.
|
||||
* @param ignoreCase true if sorting should be case insensitive. false if sorting should be case sensitive.
|
||||
@@ -499,7 +499,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns the order the property shall be sorted for.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Direction getDirection() {
|
||||
@@ -508,7 +508,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns the property to order for.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getProperty() {
|
||||
@@ -517,7 +517,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns whether sorting for this property shall be ascending.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isAscending() {
|
||||
@@ -526,7 +526,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns whether sorting for this property shall be descending.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* @since 1.13
|
||||
*/
|
||||
@@ -536,7 +536,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns whether or not the sort will be case sensitive.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isIgnoreCase() {
|
||||
@@ -545,7 +545,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns a new {@link Order} with the given {@link Direction}.
|
||||
*
|
||||
*
|
||||
* @param direction
|
||||
* @return
|
||||
*/
|
||||
@@ -555,7 +555,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns a new {@link Order}
|
||||
*
|
||||
*
|
||||
* @param property must not be {@literal null} or empty.
|
||||
* @return
|
||||
* @since 1.13
|
||||
@@ -566,7 +566,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns a new {@link Sort} instance for the given properties.
|
||||
*
|
||||
*
|
||||
* @param properties
|
||||
* @return
|
||||
*/
|
||||
@@ -576,7 +576,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns a new {@link Order} with case insensitive sorting enabled.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Order ignoreCase() {
|
||||
@@ -585,7 +585,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns a {@link Order} with the given {@link NullHandling}.
|
||||
*
|
||||
*
|
||||
* @param nullHandling can be {@literal null}.
|
||||
* @return
|
||||
* @since 1.8
|
||||
@@ -596,7 +596,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns a {@link Order} with {@link NullHandling#NULLS_FIRST} as null handling hint.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* @since 1.8
|
||||
*/
|
||||
@@ -606,7 +606,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns a {@link Order} with {@link NullHandling#NULLS_LAST} as null handling hint.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* @since 1.7
|
||||
*/
|
||||
@@ -616,7 +616,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns a {@link Order} with {@link NullHandling#NATIVE} as null handling hint.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* @since 1.7
|
||||
*/
|
||||
@@ -626,7 +626,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
|
||||
/**
|
||||
* Returns the used {@link NullHandling} hint, which can but may not be respected by the used datastore.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* @since 1.7
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2017 the original author or authors.
|
||||
* Copyright 2017-2018 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.
|
||||
@@ -17,14 +17,14 @@ package org.springframework.data.domain;
|
||||
|
||||
/**
|
||||
* {@link Pageable} implementation to represent the absence of pagination information.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
enum Unpaged implements Pageable {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.domain.Pageable#isPaged()
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -24,14 +24,14 @@ import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* XmlAdapter to convert {@link Order} instances into {@link OrderDto}s and vice versa.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class OrderAdapter extends XmlAdapter<OrderDto, Order> {
|
||||
|
||||
public static final OrderAdapter INSTANCE = new OrderAdapter();
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see javax.xml.bind.annotation.adapters.XmlAdapter#marshal(java.lang.Object)
|
||||
*/
|
||||
@@ -49,7 +49,7 @@ public class OrderAdapter extends XmlAdapter<OrderDto, Order> {
|
||||
return dto;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -27,7 +27,7 @@ import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* {@link XmlAdapter} to convert {@link Page} instances into {@link PageDto} instances and vice versa.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class PageAdapter extends XmlAdapter<PageDto, Page<Object>> {
|
||||
@@ -51,7 +51,7 @@ public class PageAdapter extends XmlAdapter<PageDto, Page<Object>> {
|
||||
return dto;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
|
||||
*/
|
||||
@@ -63,7 +63,7 @@ public class PageAdapter extends XmlAdapter<PageDto, Page<Object>> {
|
||||
|
||||
/**
|
||||
* Return additional links that shall be added to the {@link PageDto}.
|
||||
*
|
||||
*
|
||||
* @param source the source {@link Page}.
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -28,7 +28,7 @@ import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* {@link XmlAdapter} to convert {@link Pageable} instances int a {@link PageRequestDto} and vice versa.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Christoph Strobl
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -24,7 +24,7 @@ import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* {@link XmlAdapter} to convert {@link Sort} instances into {@link SortDto} instances and vice versa.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class SortAdapter extends XmlAdapter<SortDto, Sort> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -42,7 +42,7 @@ import org.springframework.util.Assert;
|
||||
/**
|
||||
* Helper class containing utility methods to implement JAXB {@link XmlAdapter}s as well as the DTO types to be
|
||||
* marshalled by JAXB.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public abstract class SpringDataJaxb {
|
||||
@@ -53,7 +53,7 @@ public abstract class SpringDataJaxb {
|
||||
|
||||
/**
|
||||
* The DTO for {@link Pageable}s/{@link PageRequest}s.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@XmlRootElement(name = "page-request", namespace = NAMESPACE)
|
||||
@@ -66,7 +66,7 @@ public abstract class SpringDataJaxb {
|
||||
|
||||
/**
|
||||
* The DTO for {@link Sort}.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@XmlRootElement(name = "sort", namespace = NAMESPACE)
|
||||
@@ -78,7 +78,7 @@ public abstract class SpringDataJaxb {
|
||||
|
||||
/**
|
||||
* The DTO for {@link Order}.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@XmlRootElement(name = "order", namespace = NAMESPACE)
|
||||
@@ -91,7 +91,7 @@ public abstract class SpringDataJaxb {
|
||||
|
||||
/**
|
||||
* The DTO for {@link Page}.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@XmlRootElement(name = "page", namespace = NAMESPACE)
|
||||
@@ -103,7 +103,7 @@ public abstract class SpringDataJaxb {
|
||||
|
||||
/**
|
||||
* Unmarshals each element of the given {@link Collection} using the given {@link XmlAdapter}.
|
||||
*
|
||||
*
|
||||
* @param source
|
||||
* @param adapter must not be {@literal null}.
|
||||
* @return
|
||||
@@ -131,7 +131,7 @@ public abstract class SpringDataJaxb {
|
||||
|
||||
/**
|
||||
* Marshals each of the elements of the given {@link Iterable} using the given {@link XmlAdapter}.
|
||||
*
|
||||
*
|
||||
* @param source
|
||||
* @param adapter must not be {@literal null}.
|
||||
* @return
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 the original author or authors.
|
||||
* Copyright 2010-2018 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,7 +20,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Represents a geospatial box value
|
||||
*
|
||||
*
|
||||
* @author Mark Pollack
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
@@ -35,7 +35,7 @@ public class Box implements Shape {
|
||||
|
||||
/**
|
||||
* Creates a new Box spanning from the given first to the second {@link Point}.
|
||||
*
|
||||
*
|
||||
* @param first must not be {@literal null}.
|
||||
* @param second must not be {@literal null}.
|
||||
*/
|
||||
@@ -50,7 +50,7 @@ public class Box implements Shape {
|
||||
|
||||
/**
|
||||
* Creates a new Box from the given {@code first} to the {@code second} point represented as the {@literal double[]}.
|
||||
*
|
||||
*
|
||||
* @param first must not be {@literal null} and contain exactly 2 doubles.
|
||||
* @param second must not be {@literal null} and contain exactly 2 doubles.
|
||||
*/
|
||||
@@ -65,7 +65,7 @@ public class Box implements Shape {
|
||||
|
||||
/**
|
||||
* Returns the first {@link Point} making up the {@link Box}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Point getFirst() {
|
||||
@@ -74,7 +74,7 @@ public class Box implements Shape {
|
||||
|
||||
/**
|
||||
* Returns the second {@link Point} making up the {@link Box}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Point getSecond() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 the original author or authors.
|
||||
* Copyright 2010-2018 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.
|
||||
@@ -22,7 +22,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Represents a geospatial circle value
|
||||
*
|
||||
*
|
||||
* @author Mark Pollack
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
@@ -38,7 +38,7 @@ public class Circle implements Shape {
|
||||
|
||||
/**
|
||||
* Creates a new {@link Circle} from the given {@link Point} and radius.
|
||||
*
|
||||
*
|
||||
* @param center must not be {@literal null}.
|
||||
* @param radius must not be {@literal null} and it's value greater or equal to zero.
|
||||
*/
|
||||
@@ -55,7 +55,7 @@ public class Circle implements Shape {
|
||||
|
||||
/**
|
||||
* Creates a new {@link Circle} from the given {@link Point} and radius.
|
||||
*
|
||||
*
|
||||
* @param center must not be {@literal null}.
|
||||
* @param radius's value must be greater or equal to zero.
|
||||
*/
|
||||
@@ -66,7 +66,7 @@ public class Circle implements Shape {
|
||||
/**
|
||||
* Creates a new {@link Circle} from the given coordinates and radius as {@link Distance} with a
|
||||
* {@link Metrics#NEUTRAL}.
|
||||
*
|
||||
*
|
||||
* @param centerX
|
||||
* @param centerY
|
||||
* @param radius must be greater or equal to zero.
|
||||
@@ -77,7 +77,7 @@ public class Circle implements Shape {
|
||||
|
||||
/**
|
||||
* Returns the center of the {@link Circle}.
|
||||
*
|
||||
*
|
||||
* @return will never be {@literal null}.
|
||||
*/
|
||||
public Point getCenter() {
|
||||
@@ -86,7 +86,7 @@ public class Circle implements Shape {
|
||||
|
||||
/**
|
||||
* Returns the radius of the {@link Circle}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Distance getRadius() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2015 the original author or authors.
|
||||
* Copyright 2013-2018 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.
|
||||
@@ -19,7 +19,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Value object to create custom {@link Metric}s on the fly.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
* @since 1.8
|
||||
@@ -33,7 +33,7 @@ public class CustomMetric implements Metric {
|
||||
|
||||
/**
|
||||
* Creates a custom {@link Metric} using the given multiplier.
|
||||
*
|
||||
*
|
||||
* @param multiplier
|
||||
*/
|
||||
public CustomMetric(double multiplier) {
|
||||
@@ -43,7 +43,7 @@ public class CustomMetric implements Metric {
|
||||
|
||||
/**
|
||||
* Creates a custom {@link Metric} using the given multiplier and abbreviation.
|
||||
*
|
||||
*
|
||||
* @param multiplier
|
||||
* @param abbreviation must not be {@literal null}.
|
||||
*/
|
||||
@@ -55,7 +55,7 @@ public class CustomMetric implements Metric {
|
||||
this.abbreviation = abbreviation;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mongodb.core.geo.Metric#getMultiplier()
|
||||
*/
|
||||
@@ -63,7 +63,7 @@ public class CustomMetric implements Metric {
|
||||
return multiplier;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.geo.Metric#getAbbreviation()
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2015 the original author or authors.
|
||||
* Copyright 2010-2018 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.
|
||||
@@ -26,7 +26,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Value object to represent distances in a given metric.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
* @since 1.8
|
||||
@@ -48,7 +48,7 @@ public class Distance implements Serializable, Comparable<Distance> {
|
||||
|
||||
/**
|
||||
* Creates a new {@link Distance} with a neutral metric. This means the provided value needs to be in normalized form.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
public Distance(double value) {
|
||||
@@ -57,7 +57,7 @@ public class Distance implements Serializable, Comparable<Distance> {
|
||||
|
||||
/**
|
||||
* Creates a new {@link Distance} with the given {@link Metric}.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* @param metric must not be {@literal null}.
|
||||
*/
|
||||
@@ -71,7 +71,7 @@ public class Distance implements Serializable, Comparable<Distance> {
|
||||
|
||||
/**
|
||||
* Creates a {@link Range} between the given {@link Distance}.
|
||||
*
|
||||
*
|
||||
* @param min can be {@literal null}.
|
||||
* @param max can be {@literal null}.
|
||||
* @return will never be {@literal null}.
|
||||
@@ -82,7 +82,7 @@ public class Distance implements Serializable, Comparable<Distance> {
|
||||
|
||||
/**
|
||||
* Creates a new {@link Range} by creating minimum and maximum {@link Distance} from the given values.
|
||||
*
|
||||
*
|
||||
* @param minValue
|
||||
* @param minMetric can be {@literal null}.
|
||||
* @param maxValue
|
||||
@@ -95,7 +95,7 @@ public class Distance implements Serializable, Comparable<Distance> {
|
||||
|
||||
/**
|
||||
* Returns the normalized value regarding the underlying {@link Metric}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public double getNormalizedValue() {
|
||||
@@ -104,7 +104,7 @@ public class Distance implements Serializable, Comparable<Distance> {
|
||||
|
||||
/**
|
||||
* Returns a {@link String} representation of the unit the distance is in.
|
||||
*
|
||||
*
|
||||
* @return the unit
|
||||
* @see Metric#getAbbreviation()
|
||||
*/
|
||||
@@ -115,7 +115,7 @@ public class Distance implements Serializable, Comparable<Distance> {
|
||||
/**
|
||||
* Adds the given distance to the current one. The resulting {@link Distance} will be in the same metric as the
|
||||
* current one.
|
||||
*
|
||||
*
|
||||
* @param other must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -130,7 +130,7 @@ public class Distance implements Serializable, Comparable<Distance> {
|
||||
|
||||
/**
|
||||
* Adds the given {@link Distance} to the current one and forces the result to be in a given {@link Metric}.
|
||||
*
|
||||
*
|
||||
* @param other must not be {@literal null}.
|
||||
* @param metric must not be {@literal null}.
|
||||
* @return
|
||||
@@ -149,7 +149,7 @@ public class Distance implements Serializable, Comparable<Distance> {
|
||||
/**
|
||||
* Returns a new {@link Distance} in the given {@link Metric}. This means that the returned instance will have the
|
||||
* same normalized value as the original instance.
|
||||
*
|
||||
*
|
||||
* @param metric must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -160,7 +160,7 @@ public class Distance implements Serializable, Comparable<Distance> {
|
||||
return this.metric.equals(metric) ? this : new Distance(getNormalizedValue() * metric.getMultiplier(), metric);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Comparable#compareTo(java.lang.Object)
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2016 the original author or authors.
|
||||
* Copyright 2014-2018 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.
|
||||
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
|
||||
/**
|
||||
* Custom module to deserialize the geo-spatial value objects using Jackson 2.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.8
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2014 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
@@ -26,7 +26,7 @@ import org.springframework.util.ObjectUtils;
|
||||
/**
|
||||
* Custom {@link Page} to carry the average distance retrieved from the {@link GeoResults} the {@link GeoPage} is set up
|
||||
* from.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
* @since 1.8
|
||||
@@ -42,7 +42,7 @@ public class GeoPage<T> extends PageImpl<GeoResult<T>> {
|
||||
|
||||
/**
|
||||
* Creates a new {@link GeoPage} from the given {@link GeoResults}.
|
||||
*
|
||||
*
|
||||
* @param content must not be {@literal null}.
|
||||
*/
|
||||
public GeoPage(GeoResults<T> results) {
|
||||
@@ -54,7 +54,7 @@ public class GeoPage<T> extends PageImpl<GeoResult<T>> {
|
||||
|
||||
/**
|
||||
* Creates a new {@link GeoPage} from the given {@link GeoResults}, {@link Pageable} and total.
|
||||
*
|
||||
*
|
||||
* @param results must not be {@literal null}.
|
||||
* @param pageable must not be {@literal null}.
|
||||
* @param total
|
||||
@@ -66,7 +66,7 @@ public class GeoPage<T> extends PageImpl<GeoResult<T>> {
|
||||
this.averageDistance = results.getAverageDistance();
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.domain.PageImpl#equals(java.lang.Object)
|
||||
*/
|
||||
@@ -86,7 +86,7 @@ public class GeoPage<T> extends PageImpl<GeoResult<T>> {
|
||||
return super.equals(obj) && ObjectUtils.nullSafeEquals(this.averageDistance, that.averageDistance);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.domain.PageImpl#hashCode()
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2015 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
@@ -22,7 +22,7 @@ import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Value object capturing some arbitrary object plus a distance.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
* @since 1.8
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2014 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
@@ -28,7 +28,7 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Value object to capture {@link GeoResult}s as well as the average distance they have.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
* @since 1.8
|
||||
@@ -44,7 +44,7 @@ public class GeoResults<T> implements Iterable<GeoResult<T>>, Serializable {
|
||||
/**
|
||||
* Creates a new {@link GeoResults} instance manually calculating the average distance from the distance values of the
|
||||
* given {@link GeoResult}s.
|
||||
*
|
||||
*
|
||||
* @param results must not be {@literal null}.
|
||||
*/
|
||||
public GeoResults(List<? extends GeoResult<T>> results) {
|
||||
@@ -54,7 +54,7 @@ public class GeoResults<T> implements Iterable<GeoResult<T>>, Serializable {
|
||||
/**
|
||||
* Creates a new {@link GeoResults} instance manually calculating the average distance in the given {@link Metric}
|
||||
* from the distance values of the given {@link GeoResult}s.
|
||||
*
|
||||
*
|
||||
* @param results must not be {@literal null}.
|
||||
* @param metric must not be {@literal null}.
|
||||
*/
|
||||
@@ -64,7 +64,7 @@ public class GeoResults<T> implements Iterable<GeoResult<T>>, Serializable {
|
||||
|
||||
/**
|
||||
* Creates a new {@link GeoResults} instance from the given {@link GeoResult}s and average distance.
|
||||
*
|
||||
*
|
||||
* @param results must not be {@literal null}.
|
||||
* @param averageDistance must not be {@literal null}.
|
||||
*/
|
||||
@@ -80,7 +80,7 @@ public class GeoResults<T> implements Iterable<GeoResult<T>>, Serializable {
|
||||
|
||||
/**
|
||||
* Returns the average distance of all {@link GeoResult}s in this list.
|
||||
*
|
||||
*
|
||||
* @return the averageDistance
|
||||
*/
|
||||
public Distance getAverageDistance() {
|
||||
@@ -89,7 +89,7 @@ public class GeoResults<T> implements Iterable<GeoResult<T>>, Serializable {
|
||||
|
||||
/**
|
||||
* Returns the actual content of the {@link GeoResults}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<GeoResult<T>> getContent() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2015 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
@@ -19,7 +19,7 @@ import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Interface for {@link Metric}s that can be applied to a base scale.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
* @since 1.8
|
||||
@@ -28,14 +28,14 @@ public interface Metric extends Serializable {
|
||||
|
||||
/**
|
||||
* Returns the multiplier to calculate metrics values from a base scale.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
double getMultiplier();
|
||||
|
||||
/**
|
||||
* Returns the scientific abbreviation of the unit the {@link Metric} is in.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getAbbreviation();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2015 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
@@ -17,7 +17,7 @@ package org.springframework.data.geo;
|
||||
|
||||
/**
|
||||
* Commonly used {@link Metric}s.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
* @since 1.8
|
||||
@@ -31,7 +31,7 @@ public enum Metrics implements Metric {
|
||||
|
||||
/**
|
||||
* Creates a new {@link Metrics} using the given multiplier.
|
||||
*
|
||||
*
|
||||
* @param multiplier the earth radius at equator, must not be {@literal null}.
|
||||
* @param abbreviation the abbreviation to use for this {@link Metric}, must not be {@literal null}.
|
||||
*/
|
||||
@@ -49,7 +49,7 @@ public enum Metrics implements Metric {
|
||||
return multiplier;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.geo.Metric#getAbbreviation()
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 the original author or authors.
|
||||
* Copyright 2010-2018 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.
|
||||
@@ -24,7 +24,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Represents a geospatial point value.
|
||||
*
|
||||
*
|
||||
* @author Mark Pollack
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
@@ -39,7 +39,7 @@ public class Point implements Serializable {
|
||||
|
||||
/**
|
||||
* Creates a {@link Point} from the given {@code x}, {@code y} coordinate.
|
||||
*
|
||||
*
|
||||
* @param x
|
||||
* @param y
|
||||
*/
|
||||
@@ -51,7 +51,7 @@ public class Point implements Serializable {
|
||||
|
||||
/**
|
||||
* Creates a {@link Point} from the given {@link Point} coordinate.
|
||||
*
|
||||
*
|
||||
* @param point must not be {@literal null}.
|
||||
*/
|
||||
public Point(Point point) {
|
||||
@@ -64,7 +64,7 @@ public class Point implements Serializable {
|
||||
|
||||
/**
|
||||
* Returns the x-coordinate of the {@link Point}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public double getX() {
|
||||
@@ -73,7 +73,7 @@ public class Point implements Serializable {
|
||||
|
||||
/**
|
||||
* Returns the y-coordinate of the {@link Point}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public double getY() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2014 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
@@ -29,7 +29,7 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Simple value object to represent a {@link Polygon}.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
* @since 1.8
|
||||
@@ -43,7 +43,7 @@ public class Polygon implements Iterable<Point>, Shape {
|
||||
|
||||
/**
|
||||
* Creates a new {@link Polygon} for the given Points.
|
||||
*
|
||||
*
|
||||
* @param x must not be {@literal null}.
|
||||
* @param y must not be {@literal null}.
|
||||
* @param z must not be {@literal null}.
|
||||
@@ -65,7 +65,7 @@ public class Polygon implements Iterable<Point>, Shape {
|
||||
|
||||
/**
|
||||
* Creates a new {@link Polygon} for the given Points.
|
||||
*
|
||||
*
|
||||
* @param points must not be {@literal null}.
|
||||
*/
|
||||
@PersistenceConstructor
|
||||
@@ -86,7 +86,7 @@ public class Polygon implements Iterable<Point>, Shape {
|
||||
|
||||
/**
|
||||
* Returns all {@link Point}s the {@link Polygon} is made of.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<Point> getPoints() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2014 the original author or authors.
|
||||
* Copyright 2011-2018 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.
|
||||
@@ -19,7 +19,7 @@ import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Common interface for all shapes. Allows building external representations of them.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2017 the original author or authors.
|
||||
* Copyright 2014-2018 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.
|
||||
@@ -34,7 +34,7 @@ import org.springframework.util.StringUtils;
|
||||
* Converter to create {@link Distance} instances from {@link String} representations. The supported format is a decimal
|
||||
* followed by whitespace and a metric abbreviation. We currently support the following abbreviations:
|
||||
* {@value #SUPPORTED_METRICS}.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Christoph Strobl
|
||||
*/
|
||||
@@ -57,7 +57,7 @@ public enum DistanceFormatter implements Converter<String, Distance>, Formatter<
|
||||
SUPPORTED_METRICS = Collections.unmodifiableMap(metrics);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
|
||||
*/
|
||||
@@ -88,7 +88,7 @@ public enum DistanceFormatter implements Converter<String, Distance>, Formatter<
|
||||
/**
|
||||
* Converts the given {@link String} source into a distance. Expects the source to reflect the {@link Metric} as held
|
||||
* in the {@link #SUPPORTED_METRICS} map.
|
||||
*
|
||||
*
|
||||
* @param source must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -110,7 +110,7 @@ public enum DistanceFormatter implements Converter<String, Distance>, Formatter<
|
||||
|
||||
/**
|
||||
* Creates a {@link Distance} from the given source String and the {@link Metric} detected.
|
||||
*
|
||||
*
|
||||
* @param source the raw source {@link String}, must not be {@literal null} or empty.
|
||||
* @param metric the {@link Metric} detected keyed by the keyword it was detected for, must not be {@literal null}.
|
||||
* @return
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2015 the original author or authors.
|
||||
* Copyright 2014-2018 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.
|
||||
@@ -27,7 +27,7 @@ import org.springframework.format.Formatter;
|
||||
|
||||
/**
|
||||
* Converter to parse two comma-separated doubles into a {@link Point}.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public enum PointFormatter implements Converter<String, Point>, Formatter<Point> {
|
||||
@@ -38,7 +38,7 @@ public enum PointFormatter implements Converter<String, Point>, Formatter<Point>
|
||||
|
||||
private static final String INVALID_FORMAT = "Expected two doubles separated by a comma but got '%s'!";
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -29,7 +29,7 @@ import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Wrapper to contain {@link RevisionMetadata} as well as the revisioned entity.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Philipp Huegelmeyer
|
||||
* @author Christoph Strobl
|
||||
@@ -50,7 +50,7 @@ public final class Revision<N extends Number & Comparable<N>, T> implements Comp
|
||||
|
||||
/**
|
||||
* Creates a new {@link Revision} for the given {@link RevisionMetadata} and entity.
|
||||
*
|
||||
*
|
||||
* @param metadata must not be {@literal null}.
|
||||
* @param entity must not be {@literal null}.
|
||||
* @return
|
||||
@@ -61,7 +61,7 @@ public final class Revision<N extends Number & Comparable<N>, T> implements Comp
|
||||
|
||||
/**
|
||||
* Returns the revision number of the revision.
|
||||
*
|
||||
*
|
||||
* @return the revision number.
|
||||
*/
|
||||
public Optional<N> getRevisionNumber() {
|
||||
@@ -70,7 +70,7 @@ public final class Revision<N extends Number & Comparable<N>, T> implements Comp
|
||||
|
||||
/**
|
||||
* Returns the revision number of the revision, immediately failing on absence.
|
||||
*
|
||||
*
|
||||
* @return the revision number.
|
||||
*/
|
||||
public N getRequiredRevisionNumber() {
|
||||
@@ -79,7 +79,7 @@ public final class Revision<N extends Number & Comparable<N>, T> implements Comp
|
||||
|
||||
/**
|
||||
* Returns the revision date of the revision.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Optional<LocalDateTime> getRevisionDate() {
|
||||
@@ -88,7 +88,7 @@ public final class Revision<N extends Number & Comparable<N>, T> implements Comp
|
||||
|
||||
/**
|
||||
* Returns the revision date of the revision, immediately failing on absence.
|
||||
*
|
||||
*
|
||||
* @return the revision date.
|
||||
*/
|
||||
public LocalDateTime getRequiredRevisionDate() {
|
||||
@@ -109,7 +109,7 @@ public final class Revision<N extends Number & Comparable<N>, T> implements Comp
|
||||
(left, right) -> left.compareTo(right)).orElse(-1);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user