Skip to content

Commit

Permalink
DocumentQueryOrderBy: convenient factory methods
Browse files Browse the repository at this point in the history
  • Loading branch information
teosarca committed Dec 5, 2017
1 parent 3d8dd2b commit 0cbb5e0
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ public static final DocumentQueryOrderBy byFieldName(final String fieldName, fin
return new DocumentQueryOrderBy(fieldName, ascending);
}

public static final DocumentQueryOrderBy byFieldName(final String fieldName)
{
final boolean ascending = true;
return new DocumentQueryOrderBy(fieldName, ascending);
}

public static final DocumentQueryOrderBy byFieldNameDescending(final String fieldName)
{
final boolean ascending = false;
return new DocumentQueryOrderBy(fieldName, ascending);
}

/**
* @param orderBysListStr Command separated field names. Use +/- prefix for ascending/descending. e.g. +C_BPartner_ID,-DateOrdered
*/
Expand Down

0 comments on commit 0cbb5e0

Please sign in to comment.