cancel
Showing results for 
Search instead for 
Did you mean: 

Sort Hierarchy with Java API

former_member207329
Participant
0 Kudos

Hi Mdm guru,

I have to sort the getHierarchy results.

In the MDM Data Manager is possible "Sort Entire Branch" (in the context menu).

My question: there is a method in the Java Api for this funtionality?

Best Regards

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Rocco,

It depends upon <i>which</i> API you are using. The API <b>mdm4j</b> has a function

CatalogData.GetChildren()

which has a parameter for defining the sort field. So you can create your own recursive function which drills down through a hierarchy, creating each level sorted.

The class <b>SortDefinition</b> belongs to the "new" API <b>MDMJavaAPI</b>, but at present I do not see a way of gettting a sorted hierarchy with this API.

Walter

Former Member
0 Kudos

Hi Rocco,

Hope this helps you.

java.lang.Object

com.sap.mdm.data.SortDefinition

-


public class SortDefinition

extends java.lang.Object

This class includes information how the records retrieved from repository should be sorted in result set.

Regards,

Anish