I am using oslc's getlist
functionality to determine the domain on various fields of a workorder. What I am lost on is how to determine the key field in each list item returned. It seems like, depending on the field, the foreign object referenced by the response has a different structure, and that makes it difficult to determine on the fly what the key field is. For example, suppose I call getlist~lead
on a particular workorder. I get a list of person mbos back - the key field of which is personid
. But if I call getlist~status
, I get a view into the synonymdomain for status - so the key field is maxvalue
or value
.
I decided to try pulling this into a Java customization to see if I could get more clarity by working directly with the Java classes rather than trying to poke around the oslc API for something that seems to not be there. I have found the method mbo.getList(field).getMbo(i).getKeyValue().getAsString()
, but I'm kind of puzzled that it returns a String[]
rather than a single String
. When I call getList("status")
, I get this as the "key fields": ["DOMAINID", "MAXVALUE", "VALUE", "SITEID", "ORGID"]
. Is there any way I can determine what the actual key field of the mboSet returned by getList(field)
is?