Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Validates the consistency of the order by fields in case the As per date selection was chosen.
Syntax
protected boolean validateOrderBy(Query _query)
Run On
Called
Parameters
- _query
Type: Query Class
The query to validate.
Return Value
Type: boolean
true if the order by field setup is valid; otherwise, false.
Remarks
When choosing "As per date", the results that are returned by the query have to be in a certain order so they can be filtered in real-time, that is, without storing them locally. By using a RecordSortedList object to filter the records and print only the one with the closest ActivationDate value to the "As per date", the query must return the rows sorted descending on the ActivationDate value. Choosing only relevant records is also enforced by the RecordSortedList object that acts as a group by on the unique index of the table, except for the ActivationDate. By doing this the RecordSortedList object will act as a marker or flag collection. More details for this is in the fetch method. For more details, check the documentation for the RecordSortedList class.
In order to be sure that relevant prices are returned in the right ActivationDate order, only fields from the unique index of the table can appear before ActivationDate in the OrderBy fields list. For a more detailed explanation please see the design document.