|
Spring Data Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.repository.query.parser.OrderBySource
public class OrderBySource
Simple helper class to create a Sort
instance from a method name end. It expects the last part of the method
name to be given and supports lining up multiple properties ending with the sorting direction. So the following
method ends are valid: LastnameUsernameDesc
, LastnameAscUsernameDesc
.
Constructor Summary | |
---|---|
OrderBySource(String clause)
Creates a new OrderBySource for the given String clause not doing any checks whether the referenced
property actually exists. |
|
OrderBySource(String clause,
Class<?> domainClass)
Creates a new OrderBySource for the given clause, checking the property referenced exists on the given
type. |
Method Summary | |
---|---|
Sort |
toSort()
Returns the clause as Sort . |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OrderBySource(String clause)
OrderBySource
for the given String clause not doing any checks whether the referenced
property actually exists.
clause
- must not be null.public OrderBySource(String clause, Class<?> domainClass)
OrderBySource
for the given clause, checking the property referenced exists on the given
type.
clause
- must not be null.domainClass
- Method Detail |
---|
public Sort toSort()
Sort
.
Sort
or null if no orders found.public String toString()
toString
in class Object
|
Spring Data Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |