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 booleanprotected booleanstatic final booleanstatic final booleanprotected booleanstatic final booleanprotected 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 TypeMethodDescriptionintbooleanbooleanvoidvoidsetAscending(boolean ascending) voidsetCaseSensitive(boolean caseSensitive) voidsetProperty(String property) static ComparabletoComparable(Object object) static ObjecttoUpperCase(Object object) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
comparein 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
-