Table of Contents

Search

  1. Preface
  2. Introduction to Business Entity Services
  3. Enterprise Java Bean Business Entity Service Calls
  4. Representational State Transfer Business Entity Service Calls
  5. Simple Object Access Protocol Business Entity Service Calls
  6. Services for Cross-reference Records and BVT Calculations
  7. Supporting Corporate Linkage Service
  8. External Calls to Cleanse, Analyze, and Transform Data
  9. Using REST APIs to Add Records
  10. Using REST APIs to Upload Files

Sort Order Considerations

Sort Order Considerations

The Read Record API supports sorting order by one or more fields for each business entity child node. The following section describes certain considerations that you need to be aware of when you specify the sort order.
  • If you specify the sort order for the grandchild and not for the child, the grandchild element is sorted as per the order specified. The child element is not sorted by the sort order specified for the grandchild. The following is a sample request:
    http://localhost:8080/cmx/cs/localhost-orcl-DS_UI1/Person/1242/Phone/861/PhonePermissions?order=-column1
    In the sample request, while a descending sort order is specified for grandchild PhonePermissions, no order is specified for the child element Phone. Phone is not sorted by the PhonePermissions sort order.
  • If you specify the sort order for the child and not for the grandchild, the child is sorted by the sort order specified. The grandchild is not sorted by the sort order specified for the child. The following is a sample request:
    {parameters: {coFilter: { object: { name:"Person", key: { rowid: 1242 }, order: "lastName", object:[ {name:"Names", order:"-name"}, {name:"Phone", order:"-phoneCountryCd, -phoneNum", object:[{name:"PhonePermissions"}]}, ]} }}}
    In the sample request, the sort order is specified for child Phone and not for grandchild PhonePermissions. The child Phone is sorted by the order specified.
  • If you specify the sort order for the child and the grandchild, both are sorted as per the sort order. The following sample request specifies the sort order for the Phone (child) and the PhonePermissions (grandchild):
    {parameters: {coFilter: { object: { name:"Person", key: { rowid: 1242 }, order: "lastName", object:[ {name:"Names", order:"-name"}, {name:"Phone", order:"-phoneCountryCd, -phoneNum", object:[{name:"PhonePermissions", order:"-column1"}]}, ]} }}}
  • A child can be sorted only by the columns in the child itself, while the grandchild can be sorted by the columns in the grandchild. In the following sample requests, the Phone is sorted by PhoneType and the PhonePermissions is sorted by column 1. PhoneType is a column in Phone (child) and column 1 is a column in PhonePermissions (grandchild).
    http://localhost:8080/cmx/cs/localhost-orcl-DS_UI1/Person/1242/Phone?order=-PhoneType
    http://localhost:8080/cmx/cs/localhost-orcl-DS_UI1/Person/1242/Phone/861/phonePermissions?order=column1
  • At each level of business entity, for each type of children only one type of sort order is allowed. In the following request, you have specified different sort orders for the PhonePermissions children of different parents. However, because first the sort order is specified as descending, the PhonePermissions children of both parents (rowid 861 and rowid 862) are sorted in descending order.
    {parameters: {coFilter: { object: { name:"Person", key: { rowid: 1242 }, order: "lastName", object:[ {name:"Names", order:"-name"}, {name:"Phone", key: { rowid:861 }, order:"+phoneCountryCd, -phoneNum", object:[{name:"PhonePermissions", order:"-column1"}]}, {name:"Phone", key: {rowid:862}, order:"phoneNum, -phoneCountryCd", object:[{name:"PhonePermissions", order:"column1"}]} ]} }}}

0 COMMENTS

We’d like to hear from you!