Package sk.iway.iwcm.system.jpa
Class JpaComparator<T>
java.lang.Object
sk.iway.iwcm.system.jpa.JpaComparator<T>
- All Implemented Interfaces:
Serializable
,Comparator<T>
JpaComparator.java
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final boolean
protected boolean
static final boolean
static final boolean
protected boolean
static final boolean
protected String
-
Constructor Summary
ConstructorsConstructorDescriptionJpaComparator
(Class<T> clazz, String propertyName) JpaComparator
(Class<T> clazz, String propertyName, boolean isAscending) JpaComparator
(Class<T> clazz, String propertyName, boolean isAscending, boolean isCaseSensitive) -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
boolean
void
void
setAscending
(boolean ascending) void
setCaseSensitive
(boolean caseSensitive) void
setProperty
(String property) static Comparable
toComparable
(Object object) static Object
toUpperCase
(Object object) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
ASC
public static final boolean ASC- See Also:
-
DESC
public static final boolean DESC- See Also:
-
CASE_SENSITIVE
public static final boolean CASE_SENSITIVE- See Also:
-
CASE_INSENSITIVE
public static final boolean CASE_INSENSITIVE- See Also:
-
ascending
protected boolean ascending -
caseSensitive
protected boolean caseSensitive -
property
-
-
Constructor Details
-
JpaComparator
-
JpaComparator
-
JpaComparator
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<T>
- Throws:
ClassCastException
-
orderList
-
toUpperCase
-
toComparable
-
isAscending
public boolean isAscending() -
setAscending
public void setAscending(boolean ascending) -
isCaseSensitive
public boolean isCaseSensitive() -
setCaseSensitive
public void setCaseSensitive(boolean caseSensitive) -
getProperty
-
setProperty
-