cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

How to bulk retrieve attribute values

PeterWigren
1-Newbie

How to bulk retrieve attribute values

Hello!

Anyone who knows to to bulk retrieve attribute values?

To bulk load lots of attribute values from a single persistable you would normally write something like below:

PersistableAdapter pa = new PersistableAdapter(p,null,Locale.US,null);

pa.load(attributeNames);

for(String attributeName : attributeNames){

  String attributeValue = (String) pa.get(attributeName);

}

However this only allows me to fetch attribute values for a single persistable at a time.

I'm looking at a way to extend the code to bulk load a collection of persistables instead.

Does anyone know if this is possible?

Doing this by querying the database is quite easy but I would much rather use an existing API.

Thanks and best regards,

Peter

1 REPLY 1
BhushanNehe
14-Alexandrite
(To:PeterWigren)

I don't think PersistableAdapter has any constructor to take collection of objects. You can either write a QuerySpec to fetch all object and loop one by one to get the required attributes Or try using Info*Engine Webject to query objects with attributes.

Regards,

Bhushan

Top Tags