cancel
Showing results for 
Search instead for 
Did you mean: 

Create BLOB record using the new Java API

Former Member
0 Kudos

Hi Experts,

I'd like to create a binary BLOB using the new Java API. According to the Java API guide, I have to create a new instance of a BLOB record using a method from the RecordFactory class, set values for all mandatory fields and execute CreateRecordCommand.

The thing is, I don't know how to get a data group using RetrieveGroupTreeCommand and I need a data group to create my new BLOB.

Does anyone know how to use RetrieveGroupTreeCommand?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Create a command object, use setGroupType() to set the type to DATA_GROUP_TYPE, execute(), and use getGroupTree() to get the a reference to the data groups tree.

Former Member
0 Kudos

Hi Alon,

This is what I've done but I don't know how to use getGroupTree to retrieve my data groups...

Former Member
0 Kudos

You getAllLeafs() or getAllChildren() to traverse the tree until you find the Data Group you're looking for, and use getId() to get the ID you need.

Former Member
0 Kudos

Well, this is what I've tried to do but it didn't work (nullpointer exception).

And now it's working! Don't ask me why...

Thank you.

Pierre

Former Member
0 Kudos

Sometimes the weather has to be just right I guess

Answers (0)