Nuiton-utils-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
May 2014
- 1 participants
- 5 discussions
23 May '14
Author: athimel
Date: 2014-05-23 14:10:40 +0200 (Fri, 23 May 2014)
New Revision: 2630
Url: http://forge.nuiton.org/projects/nuiton-utils/repository/revisions/2630
Log:
Remove <K> generics from PaginationResult where <O> fits better
Modified:
trunk/src/main/java/org/nuiton/util/pagination/PaginationResult.java
Modified: trunk/src/main/java/org/nuiton/util/pagination/PaginationResult.java
===================================================================
--- trunk/src/main/java/org/nuiton/util/pagination/PaginationResult.java 2014-05-22 14:19:06 UTC (rev 2629)
+++ trunk/src/main/java/org/nuiton/util/pagination/PaginationResult.java 2014-05-23 12:10:40 UTC (rev 2630)
@@ -37,15 +37,15 @@
* @author Arnaud Thimel (Code Lutin)
* @since 3.0
*/
-public class PaginationResult<K> implements Serializable {
+public class PaginationResult<O> implements Serializable {
private static final long serialVersionUID = -8794603203860852003L;
- protected List<K> elements;
+ protected List<O> elements;
protected long count;
protected PaginationParameter currentPage;
- private PaginationResult(List<K> elements, long count, PaginationParameter currentPage) {
+ private PaginationResult(List<O> elements, long count, PaginationParameter currentPage) {
this.elements = elements;
this.count = count;
this.currentPage = currentPage;
@@ -58,15 +58,15 @@
* @param elements the list of elements
* @param count the total number of elements (through all pages)
* @param currentPage the PaginationParameter used to build this paged result
- * @param <E> any object type
+ * @param <T> any object type
* @return the built instance of PaginationResult
*/
- public static <E> PaginationResult<E> of(List<E> elements, long count, PaginationParameter currentPage) {
- PaginationResult<E> result = new PaginationResult<E>(elements, count, currentPage);
+ public static <T> PaginationResult<T> of(List<T> elements, long count, PaginationParameter currentPage) {
+ PaginationResult<T> result = new PaginationResult<T>(elements, count, currentPage);
return result;
}
- public List<K> getElements() {
+ public List<O> getElements() {
return elements;
}
1
0
r2629 - in trunk/src: main/java/org/nuiton/util/pagination test/java/org/nuiton/util/pagination
by athimel@users.nuiton.org 22 May '14
by athimel@users.nuiton.org 22 May '14
22 May '14
Author: athimel
Date: 2014-05-22 16:19:06 +0200 (Thu, 22 May 2014)
New Revision: 2629
Url: http://forge.nuiton.org/projects/nuiton-utils/repository/revisions/2629
Log:
refs #3211 Add org.nuiton.util.pagination.PaginationResult#hasNextPage method
Modified:
trunk/src/main/java/org/nuiton/util/pagination/PaginationResult.java
trunk/src/test/java/org/nuiton/util/pagination/PaginationResultTest.java
Modified: trunk/src/main/java/org/nuiton/util/pagination/PaginationResult.java
===================================================================
--- trunk/src/main/java/org/nuiton/util/pagination/PaginationResult.java 2014-05-22 09:37:07 UTC (rev 2628)
+++ trunk/src/main/java/org/nuiton/util/pagination/PaginationResult.java 2014-05-22 14:19:06 UTC (rev 2629)
@@ -135,4 +135,11 @@
}
return pageCount;
}
+
+ public boolean hasNextPage() {
+ int lastPageNumber = getPageCount() - 1;
+ boolean result = currentPage.getPageNumber() < lastPageNumber;
+ return result;
+ }
+
}
Modified: trunk/src/test/java/org/nuiton/util/pagination/PaginationResultTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/util/pagination/PaginationResultTest.java 2014-05-22 09:37:07 UTC (rev 2628)
+++ trunk/src/test/java/org/nuiton/util/pagination/PaginationResultTest.java 2014-05-22 14:19:06 UTC (rev 2629)
@@ -52,6 +52,10 @@
Assert.assertEquals(50, paginationResult.getFirstPage().getPageSize());
Assert.assertEquals(0, paginationResult.getFirstPage().getStartIndex());
Assert.assertEquals(49, paginationResult.getFirstPage().getEndIndex());
+
+ List<Object> elements = Lists.newArrayList();
+ PaginationResult<Object> firstPageResult = PaginationResult.of(elements, paginationResult.getCount(), paginationResult.getFirstPage());
+ Assert.assertTrue(firstPageResult.hasNextPage());
}
@Test
@@ -60,6 +64,10 @@
Assert.assertEquals(50, paginationResult.getPreviousPage().getPageSize());
Assert.assertEquals(50, paginationResult.getPreviousPage().getStartIndex());
Assert.assertEquals(99, paginationResult.getPreviousPage().getEndIndex());
+
+ List<Object> elements = Lists.newArrayList();
+ PaginationResult<Object> previousPageResult = PaginationResult.of(elements, paginationResult.getCount(), paginationResult.getPreviousPage());
+ Assert.assertTrue(previousPageResult.hasNextPage());
}
@Test
@@ -69,6 +77,8 @@
Assert.assertEquals(50, paginationResult.getCurrentPage().getPageSize());
Assert.assertEquals(100, paginationResult.getCurrentPage().getStartIndex());
Assert.assertEquals(149, paginationResult.getCurrentPage().getEndIndex());
+
+ Assert.assertTrue(paginationResult.hasNextPage());
}
@Test
@@ -77,6 +87,10 @@
Assert.assertEquals(50, paginationResult.getNextPage().getPageSize());
Assert.assertEquals(150, paginationResult.getNextPage().getStartIndex());
Assert.assertEquals(199, paginationResult.getNextPage().getEndIndex());
+
+ List<Object> elements = Lists.newArrayList();
+ PaginationResult<Object> nextPageResult = PaginationResult.of(elements, paginationResult.getCount(), paginationResult.getNextPage());
+ Assert.assertTrue(nextPageResult.hasNextPage());
}
@Test
@@ -85,6 +99,10 @@
Assert.assertEquals(50, paginationResult.getLastPage().getPageSize());
Assert.assertEquals(200, paginationResult.getLastPage().getStartIndex());
Assert.assertEquals(249, paginationResult.getLastPage().getEndIndex());
+
+ List<Object> elements = Lists.newArrayList();
+ PaginationResult<Object> lastPageResult = PaginationResult.of(elements, paginationResult.getCount(), paginationResult.getLastPage());
+ Assert.assertFalse(lastPageResult.hasNextPage());
}
}
1
0
r2628 - in trunk/src: main/java/org/nuiton/util main/java/org/nuiton/util/pagination test/java/org/nuiton/util/pagination
by athimel@users.nuiton.org 22 May '14
by athimel@users.nuiton.org 22 May '14
22 May '14
Author: athimel
Date: 2014-05-22 11:37:07 +0200 (Thu, 22 May 2014)
New Revision: 2628
Url: http://forge.nuiton.org/projects/nuiton-utils/repository/revisions/2628
Log:
refs #3211 Improve implementation, tests and documentation
Added:
trunk/src/main/java/org/nuiton/util/pagination/package-info.java
Modified:
trunk/src/main/java/org/nuiton/util/PagerBean.java
trunk/src/main/java/org/nuiton/util/pagination/PaginationParameter.java
trunk/src/main/java/org/nuiton/util/pagination/PaginationResult.java
trunk/src/test/java/org/nuiton/util/pagination/PaginationParameterTest.java
Modified: trunk/src/main/java/org/nuiton/util/PagerBean.java
===================================================================
--- trunk/src/main/java/org/nuiton/util/PagerBean.java 2014-05-22 08:57:52 UTC (rev 2627)
+++ trunk/src/main/java/org/nuiton/util/PagerBean.java 2014-05-22 09:37:07 UTC (rev 2628)
@@ -35,7 +35,9 @@
*
* @author tchemit <chemit(a)codelutin.com>
* @since 2.6.2
+ * @deprecated since 3.0, prefer using {@link org.nuiton.util.pagination.PaginationParameter}.
*/
+@Deprecated
public class PagerBean implements Serializable {
private static final long serialVersionUID = 1L;
Modified: trunk/src/main/java/org/nuiton/util/pagination/PaginationParameter.java
===================================================================
--- trunk/src/main/java/org/nuiton/util/pagination/PaginationParameter.java 2014-05-22 08:57:52 UTC (rev 2627)
+++ trunk/src/main/java/org/nuiton/util/pagination/PaginationParameter.java 2014-05-22 09:37:07 UTC (rev 2628)
@@ -43,8 +43,19 @@
private static final long serialVersionUID = -2564463476779099397L;
+ /**
+ * 0-based page number
+ */
protected int pageNumber;
+
+ /**
+ * The size of each page. Value can be -1 (for infinite pageSize) or greater than 0
+ */
protected int pageSize;
+
+ /**
+ * The list of order clauses. This instance is unmodifiable and never null.
+ */
protected List<PaginationOrder> orderClauses;
private PaginationParameter(int pageNumber, int pageSize) {
@@ -52,16 +63,41 @@
}
private PaginationParameter(int pageNumber, int pageSize, List<PaginationOrder> orderClauses) {
+ Preconditions.checkArgument(pageNumber >= 0, "pageNumber cannot be lower than 0");
+ Preconditions.checkArgument(pageSize == -1 || pageSize > 0, "pageSize can only be -1 or greater than 0");
+ Preconditions.checkArgument(pageSize != -1 || pageNumber == 0, "This is non-sense to have pageNumber>1 if pageSize==-1");
this.pageNumber = pageNumber;
this.pageSize = pageSize;
this.orderClauses = Collections.unmodifiableList(orderClauses);
}
+ /**
+ * Method to create a PaginationParameter only based on pageNumber and pageSize (no order clauses).
+ *
+ * @param pageNumber the index (0-based) of the page
+ * @param pageSize the size of each page. Value can be -1 (for infinite pageSize) or greater than 0
+ * @return an immutable PaginationParameter instance
+ */
public static PaginationParameter of(int pageNumber, int pageSize) {
PaginationParameter result = new PaginationParameter(pageNumber, pageSize);
return result;
}
+ /**
+ * Method to create a PaginationParameter based on pageNumber, pageSize and a single order clause.
+ * <p/>
+ * If you have an unknown number of order clauses, you should use the {@link #builder(int, int)}
+ * method together with {@link org.nuiton.util.pagination.PaginationParameter.Builder#addOrder(String, boolean)} and
+ * {@link org.nuiton.util.pagination.PaginationParameter.Builder#build()} methods.
+ *
+ * @param pageNumber the index (0-based) of the page
+ * @param pageSize the size of each page. Value can be -1 (for infinite pageSize) or greater than 0
+ * @param orderClause1 an order clause attribute name. It comes together with {code}orderDesc1{/code}
+ * @param orderDesc1 the asc/desc property associated with {code}orderClause1{/code}
+ * @return an immutable PaginationParameter instance
+ * @see org.nuiton.util.pagination.PaginationOrder
+ * @see org.nuiton.util.pagination.PaginationParameter.Builder
+ */
public static PaginationParameter of(int pageNumber, int pageSize,
String orderClause1, boolean orderDesc1) {
return builder(pageNumber, pageSize)
@@ -69,6 +105,23 @@
.build();
}
+ /**
+ * Method to create a PaginationParameter based on pageNumber, pageSize and two order clauses.
+ * <p/>
+ * If you have an unknown number of order clauses, you should use the {@link #builder(int, int)}
+ * method together with {@link org.nuiton.util.pagination.PaginationParameter.Builder#addOrder(String, boolean)} and
+ * {@link org.nuiton.util.pagination.PaginationParameter.Builder#build()} methods.
+ *
+ * @param pageNumber the index (0-based) of the page
+ * @param pageSize the size of each page. Value can be -1 (for infinite pageSize) or greater than 0
+ * @param orderClause1 an order clause attribute name. It comes together with {code}orderDesc1{/code}
+ * @param orderDesc1 the asc/desc property associated with {code}orderClause1{/code}
+ * @param orderClause2 an order clause attribute name. It comes together with {code}orderDesc2{/code}
+ * @param orderDesc2 the asc/desc property associated with {code}orderClause2{/code}
+ * @return an immutable PaginationParameter instance
+ * @see org.nuiton.util.pagination.PaginationOrder
+ * @see org.nuiton.util.pagination.PaginationParameter.Builder
+ */
public static PaginationParameter of(int pageNumber, int pageSize,
String orderClause1, boolean orderDesc1,
String orderClause2, boolean orderDesc2) {
@@ -78,6 +131,25 @@
.build();
}
+ /**
+ * Method to create a PaginationParameter based on pageNumber, pageSize and three order clauses.
+ * <p/>
+ * If you have more order clauses, or an unknown number of clauses, you should use the {@link #builder(int, int)}
+ * method together with {@link org.nuiton.util.pagination.PaginationParameter.Builder#addOrder(String, boolean)} and
+ * {@link org.nuiton.util.pagination.PaginationParameter.Builder#build()} methods.
+ *
+ * @param pageNumber the index (0-based) of the page
+ * @param pageSize the size of each page. Value can be -1 (for infinite pageSize) or greater than 0
+ * @param orderClause1 an order clause attribute name. It comes together with {code}orderDesc1{/code}
+ * @param orderDesc1 the asc/desc property associated with {code}orderClause1{/code}
+ * @param orderClause2 an order clause attribute name. It comes together with {code}orderDesc2{/code}
+ * @param orderDesc2 the asc/desc property associated with {code}orderClause2{/code}
+ * @param orderClause3 an order clause attribute name. It comes together with {code}orderDesc3{/code}
+ * @param orderDesc3 the asc/desc property associated with {code}orderClause3{/code}
+ * @return an immutable PaginationParameter instance
+ * @see org.nuiton.util.pagination.PaginationOrder
+ * @see org.nuiton.util.pagination.PaginationParameter.Builder
+ */
public static PaginationParameter of(int pageNumber, int pageSize,
String orderClause1, boolean orderDesc1,
String orderClause2, boolean orderDesc2,
@@ -89,6 +161,13 @@
.build();
}
+ /**
+ * Method to create a PaginationParameter using the {@link org.nuiton.util.pagination.PaginationParameter.Builder}.
+ *
+ * @param pageNumber the index (0-based) of the page
+ * @param pageSize the size of each page. Value can be -1 (for infinite pageSize) or greater than 0
+ * @return an immutable PaginationParameter.Builder instance
+ */
public static PaginationParameter.Builder builder(int pageNumber, int pageSize) {
Builder result = new Builder(pageNumber, pageSize);
return result;
@@ -106,6 +185,11 @@
return orderClauses;
}
+ /**
+ * Method that computes the start index of a page according to {@link #pageNumber} and {@link #pageSize}.
+ *
+ * @return the computed start index
+ */
public int getStartIndex() {
if (pageNumber != 0) {
Preconditions.checkState(pageSize != -1, "This is non-sense to have pageNumber>1 if pageSize==-1");
@@ -114,6 +198,12 @@
return startIndex;
}
+ /**
+ * Method that computes the end index of a page according to {@link #pageNumber} and {@link #pageSize}. If the
+ * pageSize is -1, the end index will be {@link Integer#MAX_VALUE}.
+ *
+ * @return the computed end index
+ */
public int getEndIndex() {
int endIndex = Integer.MAX_VALUE;
if (pageSize != -1) {
@@ -123,7 +213,11 @@
}
/**
- * Class used to build an instance of PaginationParameter
+ * Class used to build an instance of PaginationParameter. Use the {@link #build()} method to create the
+ * {@link org.nuiton.util.pagination.PaginationParameter}.
+ *
+ * @author Arnaud Thimel (Code Lutin)
+ * @since 3.0
*/
public static class Builder {
@@ -131,11 +225,24 @@
protected int pageSize;
protected List<PaginationOrder> orderClauses;
+ /**
+ * Creates a Builder instance
+ *
+ * @param pageNumber the index (0-based) of the page
+ * @param pageSize the size of each page. Value can be -1 (for infinite pageSize) or greater than 0
+ */
public Builder(int pageNumber, int pageSize) {
this.pageNumber = pageNumber;
this.pageSize = pageSize;
}
+ /**
+ * Adds an order clause
+ *
+ * @param clause an order clause attribute name. It comes together with {code}desc{/code}
+ * @param desc the asc/desc property associated with {code}clause{/code}
+ * @return the current Builder for a Fluent usage
+ */
public Builder addOrder(String clause, boolean desc) {
if (orderClauses == null) {
orderClauses = Lists.newLinkedList();
@@ -145,14 +252,33 @@
return this;
}
+ /**
+ * Adds an ASC order clause
+ *
+ * @param clause an order clause attribute name
+ * @return the current Builder for a Fluent usage
+ */
public Builder addAscOrder(String clause) {
return addOrder(clause, false);
}
+ /**
+ * Adds an DESC order clause
+ *
+ * @param clause an order clause attribute name
+ * @return the current Builder for a Fluent usage
+ */
public Builder addDescOrder(String clause) {
return addOrder(clause, true);
}
+ /**
+ * Adds an order clause. The asc/desc value is guessed from the given {code}clause{/code}. The expected format
+ * is "column asc" or "column desc"
+ *
+ * @param clause an order clause attribute name. It comes together with {code}desc{/code}
+ * @return the current Builder for a Fluent usage
+ */
public Builder addOrder(String clause) {
boolean desc = false;
String cleanedClause = clause;
@@ -164,6 +290,12 @@
return addOrder(cleanedClause, desc);
}
+ /**
+ * Adds an the given order clauses
+ *
+ * @param clauses an list of order clauses
+ * @return the current Builder for a Fluent usage
+ */
public Builder addOrderClauses(Iterable<PaginationOrder> clauses) {
if (orderClauses == null) {
orderClauses = Lists.newLinkedList();
@@ -174,6 +306,11 @@
return this;
}
+ /**
+ * Final method that instantiates the immutable PaginationParameter
+ *
+ * @return the immutable PaginationParameter built
+ */
public PaginationParameter build() {
PaginationParameter result = new PaginationParameter(pageNumber, pageSize, orderClauses);
return result;
Modified: trunk/src/main/java/org/nuiton/util/pagination/PaginationResult.java
===================================================================
--- trunk/src/main/java/org/nuiton/util/pagination/PaginationResult.java 2014-05-22 08:57:52 UTC (rev 2627)
+++ trunk/src/main/java/org/nuiton/util/pagination/PaginationResult.java 2014-05-22 09:37:07 UTC (rev 2628)
@@ -31,7 +31,8 @@
/**
* Represents the result of a pagination request. It contains the result elements together with the
- * {code}PaginationParameter{/code} used to compute it.
+ * {@link org.nuiton.util.pagination.PaginationParameter} used to compute it. The class also contains methods to
+ * navigate through the other pages.
*
* @author Arnaud Thimel (Code Lutin)
* @since 3.0
@@ -50,6 +51,16 @@
this.currentPage = currentPage;
}
+ /**
+ * Creates an instance using the already computed list of {code}elements{/code} and {code}count{/count}, together
+ * with the {code}currentPage{/code} {@link org.nuiton.util.pagination.PaginationParameter} used to build it.
+ *
+ * @param elements the list of elements
+ * @param count the total number of elements (through all pages)
+ * @param currentPage the PaginationParameter used to build this paged result
+ * @param <E> any object type
+ * @return the built instance of PaginationResult
+ */
public static <E> PaginationResult<E> of(List<E> elements, long count, PaginationParameter currentPage) {
PaginationResult<E> result = new PaginationResult<E>(elements, count, currentPage);
return result;
Copied: trunk/src/main/java/org/nuiton/util/pagination/package-info.java (from rev 2626, trunk/src/main/java/org/nuiton/util/package-info.java)
===================================================================
--- trunk/src/main/java/org/nuiton/util/pagination/package-info.java (rev 0)
+++ trunk/src/main/java/org/nuiton/util/pagination/package-info.java 2014-05-22 09:37:07 UTC (rev 2628)
@@ -0,0 +1,34 @@
+/**
+ * This package contains all about pagination : <ul>
+ * <li>{@link org.nuiton.util.pagination.PaginationParameter} to express the input pagination parameters when
+ * preparing a query</li>
+ * <li>{@link org.nuiton.util.pagination.PaginationOrder} represents an order clause together with asc/desc</li>
+ * <li>{@link org.nuiton.util.pagination.PaginationResult} represents a list together with the pagination parameters
+ * used to get the list of elements. It also contains methods to navigate throw the other pages</li>
+ * </ul>
+ */
+package org.nuiton.util.pagination;
+
+/*
+ * #%L
+ * Nuiton Utils
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2014 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
Modified: trunk/src/test/java/org/nuiton/util/pagination/PaginationParameterTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/util/pagination/PaginationParameterTest.java 2014-05-22 08:57:52 UTC (rev 2627)
+++ trunk/src/test/java/org/nuiton/util/pagination/PaginationParameterTest.java 2014-05-22 09:37:07 UTC (rev 2628)
@@ -66,10 +66,28 @@
}
}
- @Test(expected = IllegalStateException.class)
- public void testInvalidIndex() {
+ @Test(expected = IllegalArgumentException.class)
+ public void testIncoherentNumbers() {
PaginationParameter paginationParameter = PaginationParameter.of(2, -1);
paginationParameter.getStartIndex();
}
+ @Test(expected = IllegalArgumentException.class)
+ public void testInvalidPageSizeTo0() {
+ PaginationParameter paginationParameter = PaginationParameter.of(5, 0);
+ paginationParameter.getStartIndex();
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void testInvalidPageSizeToMinus5() {
+ PaginationParameter paginationParameter = PaginationParameter.of(5, -5);
+ paginationParameter.getStartIndex();
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void testInvalidPageNumber() {
+ PaginationParameter paginationParameter = PaginationParameter.of(-3, 25);
+ paginationParameter.getStartIndex();
+ }
+
}
1
0
r2627 - in trunk/src: main/java/org/nuiton/util main/java/org/nuiton/util/pagination test/java/org/nuiton/util test/java/org/nuiton/util/pagination
by athimel@users.nuiton.org 22 May '14
by athimel@users.nuiton.org 22 May '14
22 May '14
Author: athimel
Date: 2014-05-22 10:57:52 +0200 (Thu, 22 May 2014)
New Revision: 2627
Url: http://forge.nuiton.org/projects/nuiton-utils/repository/revisions/2627
Log:
fixes #3211 Introduce new Pagination classes
Added:
trunk/src/main/java/org/nuiton/util/pagination/
trunk/src/main/java/org/nuiton/util/pagination/PaginationOrder.java
trunk/src/main/java/org/nuiton/util/pagination/PaginationParameter.java
trunk/src/main/java/org/nuiton/util/pagination/PaginationResult.java
trunk/src/test/java/org/nuiton/util/pagination/
trunk/src/test/java/org/nuiton/util/pagination/PaginationParameterTest.java
trunk/src/test/java/org/nuiton/util/pagination/PaginationResultTest.java
Added: trunk/src/main/java/org/nuiton/util/pagination/PaginationOrder.java
===================================================================
--- trunk/src/main/java/org/nuiton/util/pagination/PaginationOrder.java (rev 0)
+++ trunk/src/main/java/org/nuiton/util/pagination/PaginationOrder.java 2014-05-22 08:57:52 UTC (rev 2627)
@@ -0,0 +1,63 @@
+package org.nuiton.util.pagination;
+
+/*
+ * #%L
+ * ToPIA :: Persistence
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2014 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import java.io.Serializable;
+
+/**
+ * This class represents an 'order' information : order clause and asc/desc
+ *
+ * @author Arnaud Thimel (Code Lutin)
+ * @since 3.0
+ */
+public class PaginationOrder implements Serializable {
+
+ private static final long serialVersionUID = -1222944258030026951L;
+
+ protected String clause;
+ protected boolean desc;
+
+ public PaginationOrder(String clause, boolean desc) {
+ this.clause = clause;
+ this.desc = desc;
+ }
+
+ public String getClause() {
+ return clause;
+ }
+
+ public void setClause(String clause) {
+ this.clause = clause;
+ }
+
+ public boolean isDesc() {
+ return desc;
+ }
+
+ public void setDesc(boolean desc) {
+ this.desc = desc;
+ }
+
+}
Property changes on: trunk/src/main/java/org/nuiton/util/pagination/PaginationOrder.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/src/main/java/org/nuiton/util/pagination/PaginationParameter.java
===================================================================
--- trunk/src/main/java/org/nuiton/util/pagination/PaginationParameter.java (rev 0)
+++ trunk/src/main/java/org/nuiton/util/pagination/PaginationParameter.java 2014-05-22 08:57:52 UTC (rev 2627)
@@ -0,0 +1,182 @@
+package org.nuiton.util.pagination;
+
+/*
+ * #%L
+ * ToPIA :: Persistence
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2014 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+/**
+ * This class represents the necessary information to do pagination (page number, size, ...).
+ *
+ * @author Arnaud Thimel (Code Lutin)
+ * @since 3.0
+ */
+public class PaginationParameter implements Serializable {
+
+ private static final long serialVersionUID = -2564463476779099397L;
+
+ protected int pageNumber;
+ protected int pageSize;
+ protected List<PaginationOrder> orderClauses;
+
+ private PaginationParameter(int pageNumber, int pageSize) {
+ this(pageNumber, pageSize, new LinkedList<PaginationOrder>());
+ }
+
+ private PaginationParameter(int pageNumber, int pageSize, List<PaginationOrder> orderClauses) {
+ this.pageNumber = pageNumber;
+ this.pageSize = pageSize;
+ this.orderClauses = Collections.unmodifiableList(orderClauses);
+ }
+
+ public static PaginationParameter of(int pageNumber, int pageSize) {
+ PaginationParameter result = new PaginationParameter(pageNumber, pageSize);
+ return result;
+ }
+
+ public static PaginationParameter of(int pageNumber, int pageSize,
+ String orderClause1, boolean orderDesc1) {
+ return builder(pageNumber, pageSize)
+ .addOrder(orderClause1, orderDesc1)
+ .build();
+ }
+
+ public static PaginationParameter of(int pageNumber, int pageSize,
+ String orderClause1, boolean orderDesc1,
+ String orderClause2, boolean orderDesc2) {
+ return builder(pageNumber, pageSize)
+ .addOrder(orderClause1, orderDesc1)
+ .addOrder(orderClause2, orderDesc2)
+ .build();
+ }
+
+ public static PaginationParameter of(int pageNumber, int pageSize,
+ String orderClause1, boolean orderDesc1,
+ String orderClause2, boolean orderDesc2,
+ String orderClause3, boolean orderDesc3) {
+ return builder(pageNumber, pageSize)
+ .addOrder(orderClause1, orderDesc1)
+ .addOrder(orderClause2, orderDesc2)
+ .addOrder(orderClause3, orderDesc3)
+ .build();
+ }
+
+ public static PaginationParameter.Builder builder(int pageNumber, int pageSize) {
+ Builder result = new Builder(pageNumber, pageSize);
+ return result;
+ }
+
+ public int getPageNumber() {
+ return pageNumber;
+ }
+
+ public int getPageSize() {
+ return pageSize;
+ }
+
+ public List<PaginationOrder> getOrderClauses() {
+ return orderClauses;
+ }
+
+ public int getStartIndex() {
+ if (pageNumber != 0) {
+ Preconditions.checkState(pageSize != -1, "This is non-sense to have pageNumber>1 if pageSize==-1");
+ }
+ int startIndex = pageNumber * pageSize;
+ return startIndex;
+ }
+
+ public int getEndIndex() {
+ int endIndex = Integer.MAX_VALUE;
+ if (pageSize != -1) {
+ endIndex = getStartIndex() + pageSize - 1;
+ }
+ return endIndex;
+ }
+
+ /**
+ * Class used to build an instance of PaginationParameter
+ */
+ public static class Builder {
+
+ protected int pageNumber;
+ protected int pageSize;
+ protected List<PaginationOrder> orderClauses;
+
+ public Builder(int pageNumber, int pageSize) {
+ this.pageNumber = pageNumber;
+ this.pageSize = pageSize;
+ }
+
+ public Builder addOrder(String clause, boolean desc) {
+ if (orderClauses == null) {
+ orderClauses = Lists.newLinkedList();
+ }
+ PaginationOrder paginationOrder = new PaginationOrder(clause, desc);
+ orderClauses.add(paginationOrder);
+ return this;
+ }
+
+ public Builder addAscOrder(String clause) {
+ return addOrder(clause, false);
+ }
+
+ public Builder addDescOrder(String clause) {
+ return addOrder(clause, true);
+ }
+
+ public Builder addOrder(String clause) {
+ boolean desc = false;
+ String cleanedClause = clause;
+ int spaceIndex = clause.indexOf(' ');
+ if (spaceIndex != -1) {
+ cleanedClause = clause.substring(0, spaceIndex).trim();
+ desc = "desc".equalsIgnoreCase(clause.substring(spaceIndex + 1).trim());
+ }
+ return addOrder(cleanedClause, desc);
+ }
+
+ public Builder addOrderClauses(Iterable<PaginationOrder> clauses) {
+ if (orderClauses == null) {
+ orderClauses = Lists.newLinkedList();
+ }
+ if (clauses != null) {
+ Iterables.addAll(orderClauses, clauses);
+ }
+ return this;
+ }
+
+ public PaginationParameter build() {
+ PaginationParameter result = new PaginationParameter(pageNumber, pageSize, orderClauses);
+ return result;
+ }
+ }
+}
Property changes on: trunk/src/main/java/org/nuiton/util/pagination/PaginationParameter.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/src/main/java/org/nuiton/util/pagination/PaginationResult.java
===================================================================
--- trunk/src/main/java/org/nuiton/util/pagination/PaginationResult.java (rev 0)
+++ trunk/src/main/java/org/nuiton/util/pagination/PaginationResult.java 2014-05-22 08:57:52 UTC (rev 2627)
@@ -0,0 +1,127 @@
+package org.nuiton.util.pagination;
+
+/*
+ * #%L
+ * ToPIA :: Persistence
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2014 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import java.io.Serializable;
+import java.util.List;
+
+import com.google.common.base.Preconditions;
+
+/**
+ * Represents the result of a pagination request. It contains the result elements together with the
+ * {code}PaginationParameter{/code} used to compute it.
+ *
+ * @author Arnaud Thimel (Code Lutin)
+ * @since 3.0
+ */
+public class PaginationResult<K> implements Serializable {
+
+ private static final long serialVersionUID = -8794603203860852003L;
+
+ protected List<K> elements;
+ protected long count;
+ protected PaginationParameter currentPage;
+
+ private PaginationResult(List<K> elements, long count, PaginationParameter currentPage) {
+ this.elements = elements;
+ this.count = count;
+ this.currentPage = currentPage;
+ }
+
+ public static <E> PaginationResult<E> of(List<E> elements, long count, PaginationParameter currentPage) {
+ PaginationResult<E> result = new PaginationResult<E>(elements, count, currentPage);
+ return result;
+ }
+
+ public List<K> getElements() {
+ return elements;
+ }
+
+ public long getCount() {
+ return count;
+ }
+
+ public PaginationParameter getCurrentPage() {
+ return currentPage;
+ }
+
+ public PaginationParameter getNextPage() {
+ int nextPageNumber = currentPage.getPageNumber() + 1;
+ int pageSize = currentPage.getPageSize();
+ List<PaginationOrder> orderClauses = currentPage.getOrderClauses();
+ PaginationParameter result = PaginationParameter.
+ builder(nextPageNumber, pageSize).
+ addOrderClauses(orderClauses).
+ build();
+ return result;
+ }
+
+ public PaginationParameter getPreviousPage() {
+ // XXX AThimel 21/05/14 Maybe, do not fail, just return the first page ?
+ Preconditions.checkState(currentPage.getPageNumber() > 0, "You cannot get a previous page to the first one");
+ int previousPageNumber = currentPage.getPageNumber() - 1;
+ int pageSize = currentPage.getPageSize();
+ List<PaginationOrder> orderClauses = currentPage.getOrderClauses();
+ PaginationParameter result = PaginationParameter.
+ builder(previousPageNumber, pageSize).
+ addOrderClauses(orderClauses).
+ build();
+ return result;
+ }
+
+ public PaginationParameter getFirstPage() {
+ int firstPageNumber = 0;
+ int pageSize = currentPage.getPageSize();
+ List<PaginationOrder> orderClauses = currentPage.getOrderClauses();
+ PaginationParameter result = PaginationParameter.
+ builder(firstPageNumber, pageSize).
+ addOrderClauses(orderClauses).
+ build();
+ return result;
+ }
+
+ public PaginationParameter getLastPage() {
+ int lastPageNumber = getPageCount() - 1;
+ int pageSize = currentPage.getPageSize();
+ List<PaginationOrder> orderClauses = currentPage.getOrderClauses();
+ PaginationParameter result = PaginationParameter.
+ builder(lastPageNumber, pageSize).
+ addOrderClauses(orderClauses).
+ build();
+ return result;
+ }
+
+ public int getPageCount() {
+ int pageCount = 1;
+ int pageSize = currentPage.getPageSize();
+ if (pageSize > 1) {
+ double countDouble = Long.valueOf(count).doubleValue();
+ double pageSizeDouble = Integer.valueOf(pageSize).doubleValue();
+ double pageNumberDouble = Math.ceil(countDouble / pageSizeDouble);
+ pageCount = Double.valueOf(pageNumberDouble).intValue();
+ }
+ return pageCount;
+ }
+}
Property changes on: trunk/src/main/java/org/nuiton/util/pagination/PaginationResult.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/src/test/java/org/nuiton/util/pagination/PaginationParameterTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/util/pagination/PaginationParameterTest.java (rev 0)
+++ trunk/src/test/java/org/nuiton/util/pagination/PaginationParameterTest.java 2014-05-22 08:57:52 UTC (rev 2627)
@@ -0,0 +1,75 @@
+package org.nuiton.util.pagination;
+
+/*
+ * #%L
+ * ToPIA :: Persistence
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2014 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author Arnaud Thimel (Code Lutin)
+ */
+public class PaginationParameterTest {
+
+ @Test
+ public void testIndexes() {
+ {
+ PaginationParameter paginationParameter = PaginationParameter.of(0, 50);
+ Assert.assertEquals(0, paginationParameter.getStartIndex());
+ Assert.assertEquals(49, paginationParameter.getEndIndex());
+ }
+ {
+ PaginationParameter paginationParameter = PaginationParameter.of(2, 50);
+ Assert.assertEquals(100, paginationParameter.getStartIndex());
+ Assert.assertEquals(149, paginationParameter.getEndIndex());
+ }
+ {
+ PaginationParameter paginationParameter = PaginationParameter.of(0, -1);
+ Assert.assertEquals(0, paginationParameter.getStartIndex());
+ Assert.assertEquals(Integer.MAX_VALUE, paginationParameter.getEndIndex());
+ }
+ {
+ PaginationParameter paginationParameter = PaginationParameter.of(0, 19);
+ Assert.assertEquals(0, paginationParameter.getStartIndex());
+ Assert.assertEquals(18, paginationParameter.getEndIndex());
+ }
+ {
+ PaginationParameter paginationParameter = PaginationParameter.of(1, 19);
+ Assert.assertEquals(19, paginationParameter.getStartIndex());
+ Assert.assertEquals(37, paginationParameter.getEndIndex());
+ }
+ {
+ PaginationParameter paginationParameter = PaginationParameter.of(2, 19);
+ Assert.assertEquals(38, paginationParameter.getStartIndex());
+ Assert.assertEquals(56, paginationParameter.getEndIndex());
+ }
+ }
+
+ @Test(expected = IllegalStateException.class)
+ public void testInvalidIndex() {
+ PaginationParameter paginationParameter = PaginationParameter.of(2, -1);
+ paginationParameter.getStartIndex();
+ }
+
+}
Property changes on: trunk/src/test/java/org/nuiton/util/pagination/PaginationParameterTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/src/test/java/org/nuiton/util/pagination/PaginationResultTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/util/pagination/PaginationResultTest.java (rev 0)
+++ trunk/src/test/java/org/nuiton/util/pagination/PaginationResultTest.java 2014-05-22 08:57:52 UTC (rev 2627)
@@ -0,0 +1,90 @@
+package org.nuiton.util.pagination;
+
+/*
+ * #%L
+ * ToPIA :: Persistence
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2014 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.google.common.collect.Lists;
+
+/**
+ * @author Arnaud Thimel (Code Lutin)
+ */
+public class PaginationResultTest {
+
+ protected PaginationResult<Object> paginationResult;
+
+ @Before
+ public void init() {
+ List<Object> elements = Lists.newArrayList();
+ PaginationParameter page = PaginationParameter.of(2, 50);
+ paginationResult = PaginationResult.of(elements, 204, page);
+ }
+
+ @Test
+ public void testGetFirstPage() {
+ Assert.assertEquals(0, paginationResult.getFirstPage().getPageNumber());
+ Assert.assertEquals(50, paginationResult.getFirstPage().getPageSize());
+ Assert.assertEquals(0, paginationResult.getFirstPage().getStartIndex());
+ Assert.assertEquals(49, paginationResult.getFirstPage().getEndIndex());
+ }
+
+ @Test
+ public void testGetPreviousPage() {
+ Assert.assertEquals(1, paginationResult.getPreviousPage().getPageNumber());
+ Assert.assertEquals(50, paginationResult.getPreviousPage().getPageSize());
+ Assert.assertEquals(50, paginationResult.getPreviousPage().getStartIndex());
+ Assert.assertEquals(99, paginationResult.getPreviousPage().getEndIndex());
+ }
+
+ @Test
+ public void testCurrentPage() {
+ Assert.assertEquals(5, paginationResult.getPageCount());
+ Assert.assertEquals(2, paginationResult.getCurrentPage().getPageNumber());
+ Assert.assertEquals(50, paginationResult.getCurrentPage().getPageSize());
+ Assert.assertEquals(100, paginationResult.getCurrentPage().getStartIndex());
+ Assert.assertEquals(149, paginationResult.getCurrentPage().getEndIndex());
+ }
+
+ @Test
+ public void testGeNextPage() {
+ Assert.assertEquals(3, paginationResult.getNextPage().getPageNumber());
+ Assert.assertEquals(50, paginationResult.getNextPage().getPageSize());
+ Assert.assertEquals(150, paginationResult.getNextPage().getStartIndex());
+ Assert.assertEquals(199, paginationResult.getNextPage().getEndIndex());
+ }
+
+ @Test
+ public void testGetLastPage() {
+ Assert.assertEquals(4, paginationResult.getLastPage().getPageNumber());
+ Assert.assertEquals(50, paginationResult.getLastPage().getPageSize());
+ Assert.assertEquals(200, paginationResult.getLastPage().getStartIndex());
+ Assert.assertEquals(249, paginationResult.getLastPage().getEndIndex());
+ }
+
+}
Property changes on: trunk/src/test/java/org/nuiton/util/pagination/PaginationResultTest.java
___________________________________________________________________
Added: svn:eol-style
+ native
Added: svn:keywords
+ Author Date Id Revision HeadURL
1
0
r2626 - in trunk/src: main/java/org/nuiton/util main/java/org/nuiton/util/beans test/java/org/nuiton/util
by athimel@users.nuiton.org 22 May '14
by athimel@users.nuiton.org 22 May '14
22 May '14
Author: athimel
Date: 2014-05-22 10:55:47 +0200 (Thu, 22 May 2014)
New Revision: 2626
Url: http://forge.nuiton.org/projects/nuiton-utils/repository/revisions/2626
Log:
SVN properties and file headers
Modified:
trunk/src/main/java/org/nuiton/util/NumberUtil.java
trunk/src/main/java/org/nuiton/util/beans/InstanceFactory.java
trunk/src/test/java/org/nuiton/util/NumberUtilTest.java
Modified: trunk/src/main/java/org/nuiton/util/NumberUtil.java
===================================================================
--- trunk/src/main/java/org/nuiton/util/NumberUtil.java 2014-03-14 16:47:04 UTC (rev 2625)
+++ trunk/src/main/java/org/nuiton/util/NumberUtil.java 2014-05-22 08:55:47 UTC (rev 2626)
@@ -3,8 +3,8 @@
/*
* #%L
* Nuiton Utils
- * $Id:$
- * $HeadURL:$
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2004 - 2014 CodeLutin
* %%
Property changes on: trunk/src/main/java/org/nuiton/util/NumberUtil.java
___________________________________________________________________
Added: svn:eol-style
+ native
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/src/main/java/org/nuiton/util/beans/InstanceFactory.java
===================================================================
--- trunk/src/main/java/org/nuiton/util/beans/InstanceFactory.java 2014-03-14 16:47:04 UTC (rev 2625)
+++ trunk/src/main/java/org/nuiton/util/beans/InstanceFactory.java 2014-05-22 08:55:47 UTC (rev 2626)
@@ -2,8 +2,8 @@
* #%L
* Nuiton Utils
*
- * $Id: BinderModelBuilder.java 2613 2013-12-12 15:03:49Z sbavencoff $
- * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/src/main/java/org/nuiton/util/… $
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2013 - 2014 CodeLutin
* %%
Property changes on: trunk/src/main/java/org/nuiton/util/beans/InstanceFactory.java
___________________________________________________________________
Added: svn:eol-style
+ native
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/src/test/java/org/nuiton/util/NumberUtilTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/util/NumberUtilTest.java 2014-03-14 16:47:04 UTC (rev 2625)
+++ trunk/src/test/java/org/nuiton/util/NumberUtilTest.java 2014-05-22 08:55:47 UTC (rev 2626)
@@ -3,8 +3,8 @@
/*
* #%L
* Nuiton Utils
- * $Id:$
- * $HeadURL:$
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2004 - 2014 CodeLutin
* %%
Property changes on: trunk/src/test/java/org/nuiton/util/NumberUtilTest.java
___________________________________________________________________
Added: svn:eol-style
+ native
Added: svn:keywords
+ Author Date Id Revision HeadURL
1
0