Java SDK - How can I pass a function call to ValueCollection
Hello,
I am using the Java SDK to invoke service QueryImplementingThingsOptimized
let result = ThingTemplates["LoraDeviceGenericModel"].QueryImplementingThingsOptimized(
{
maxItems: 1000,
});
The corresponding Java code is as follows;
ValueCollection getEntityListParams = new ValueCollection();
getEntityListParams.SetNumberValue("maxItems", BATCH_THINGS);
getEntityListParams.SetNumberValue("offset", offset);
InfoTable queryResult = thingClient.invokeService(ThingTemplates, "LoraDeviceGenericModel", "QueryImplementingThingsOptimized",
getEntityListParams, TIMEOUT_30_000_MS);
But this call could be optimized by using a filter on returned fields;
function entityList(inarray) {
let out = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape({ dataShapeName: 'EntityList' });
inarray.forEach(entry => out.AddRow({ name: entry, description: entry }));
return out;
}
let result = ThingTemplates["LoraDeviceGenericModel"].QueryImplementingThingsOptimized(
{
maxItems: 1000,
basicPropertyNames: entityList(['name']),
propertyNames:entityList(['name'])
}
);
My Question is how can I do this via the Java SDK.
ValueCollection getEntityListParams = new ValueCollection();
getEntityListParams.SetNumberValue("maxItems", BATCH_THINGS);
How do I need to populate the ValueCollection to set the basicPropertyNames and propertyNames entries?

