|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.genericdao.search.Sort
public class Sort
Used to specify field ordering in Search.
Search,
Serialized Form| Field Summary | |
|---|---|
protected boolean |
customExpression
|
protected boolean |
desc
|
protected boolean |
ignoreCase
|
protected String |
property
|
| Constructor Summary | |
|---|---|
Sort()
|
|
Sort(boolean isCustomExpression,
String property)
If isCustomExpression is true, the "property" of this Sort is reckoned as a free-form JPQL/HQL order-by expression. |
|
Sort(boolean isCustomExpression,
String property,
boolean desc)
If isCustomExpression is true, the "property" of this Sort is reckoned as a free-form JPQL/HQL order-by expression. |
|
Sort(String property)
|
|
Sort(String property,
boolean desc)
|
|
Sort(String property,
boolean desc,
boolean ignoreCase)
|
|
| Method Summary | |
|---|---|
static Sort |
asc(String property)
|
static Sort |
asc(String property,
boolean ignoreCase)
|
static Sort |
customExpressionAsc(String expression)
Instead of a property for this Sort, use a free-form JPQL/HQL order-by expression. |
static Sort |
customExpressionDesc(String expression)
Instead of a property for this Sort, use a free-form JPQL/HQL order-by expression. |
static Sort |
desc(String property)
|
static Sort |
desc(String property,
boolean ignoreCase)
|
boolean |
equals(Object obj)
|
String |
getProperty()
Property on which to sort |
int |
hashCode()
|
boolean |
isCustomExpression()
If true, the "property" of this Sort is reckoned as a free-form JPQL/HQL order-by expression. |
boolean |
isDesc()
If true, sort descending by the given property; otherwise, sort ascending. |
boolean |
isIgnoreCase()
If true the ordering will be case insensitive for this property. |
void |
setCustomExpression(boolean customExpression)
If true, the "property" of this Sort is reckoned as a free-form JPQL/HQL order-by expression. |
void |
setDesc(boolean desc)
If true, sort descending by the given property; otherwise, sort ascending. |
void |
setIgnoreCase(boolean ignoreCase)
If true the ordering will be case insensitive for this property. |
void |
setProperty(String property)
Property on which to sort |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String property
protected boolean desc
protected boolean ignoreCase
protected boolean customExpression
| Constructor Detail |
|---|
public Sort()
public Sort(String property,
boolean desc,
boolean ignoreCase)
public Sort(String property,
boolean desc)
public Sort(String property)
public Sort(boolean isCustomExpression,
String property,
boolean desc)
Here are some examples:
new Sort(true, "cast({employeeno} as integer)");
new Sort(true, "abs({prop1} - {prop2})");
public Sort(boolean isCustomExpression,
String property)
Here are some examples:
new Sort(true, "cast({employeeno} as integer)", true);
new Sort(true, "abs({prop1} - {prop2})", true);
| Method Detail |
|---|
public static Sort asc(String property)
public static Sort asc(String property,
boolean ignoreCase)
public static Sort desc(String property)
public static Sort desc(String property,
boolean ignoreCase)
public static Sort customExpressionAsc(String expression)
Here are some examples:
Sort.customExpressionAsc("cast({employeeno} as integer)");
Sort.customExpressionAsc("abs({prop1} - {prop2})");
public static Sort customExpressionDesc(String expression)
Here are some examples:
Sort.customExpressionDesc("cast({employeeno} as integer)");
Sort.customExpressionDesc("abs({prop1} - {prop2})");
public String getProperty()
public void setProperty(String property)
public boolean isDesc()
public void setDesc(boolean desc)
public boolean isIgnoreCase()
public void setIgnoreCase(boolean ignoreCase)
public boolean isCustomExpression()
If true, the "property" of this Sort is reckoned as a free-form JPQL/HQL order-by expression. Reference properties by wrapping them with curly braces ({}).
When set to true, the ignoreCase property
is ignored.
Here are some examples:
new Sort(true, "cast({employeeno} as integer)");
new Sort(true, "abs({prop1} - {prop2})", true);
Sort.ascCustom("cast({employeeno} as integer)");
Sort.descCustom("abs({prop1} - {prop2})");
public void setCustomExpression(boolean customExpression)
If true, the "property" of this Sort is reckoned as a free-form JPQL/HQL order-by expression. Reference properties by wrapping them with curly braces ({}).
When set to true, the ignoreCase property
is ignored.
Here are some examples:
new Sort(true, "cast({employeeno} as integer)");
new Sort(true, "abs({prop1} - {prop2})", true);
Sort.ascCustom("cast({employeeno} as integer)");
Sort.descCustom("abs({prop1} - {prop2})");
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||