DATACMNS-1240 - Update copyright years to 2018.

Also, remove some trailing whitespaces and align outdated license header format.
This commit is contained in:
Mark Paluch
2018-01-01 08:59:42 +01:00
parent eb2163a29e
commit 51e7e1b7f5
632 changed files with 2269 additions and 2278 deletions

View File

@@ -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)

View File

@@ -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)
*/

View File

@@ -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

View File

@@ -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);

View File

@@ -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();

View File

@@ -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
*/

View File

@@ -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

View File

@@ -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.

View File

@@ -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.

View File

@@ -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

View File

@@ -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)
*/

View File

@@ -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.

View File

@@ -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() {

View File

@@ -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();

View File

@@ -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
*/

View File

@@ -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

View File

@@ -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)
*/

View File

@@ -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
*/

View File

@@ -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()
*/

View File

@@ -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)
*/

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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> {

View File

@@ -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