cancel
Showing results for 
Search instead for 
Did you mean: 

CAP JAVA SDK: CqnModifier: How to create a CqnSortSpecification

0 Kudos

I am referring to URL:

https://cap.cloud.sap/docs/java/query-api

I am trying to use CqnModifier to add a CqnSortSpecification to a select query. However, I can't find a way to create a new CqnSortSpecification so I can use the build-in add() function. This is my code:

      CQL.copy(select, new CqnModifier() {
            @Override
            public List<CqnSortSpecification> orderBy(List<CqnSortSpecification> orderSpec) {
                    orderSpec.add(??);
                    return orderSpec;
            
            }

Thanks in advance!

View Entire Topic
adrian_goerler
Employee
Employee
0 Kudos

Please find the general documentation on how to create a sport specification here: Ordering and Pagination.

Well add an example for usage in a modifier.