}
// Populate object's metadata details.
MetadataEntry[] metadata = result.getMetadata();
for (int i = 0; i < metadata.length; i++) {
MetadataEntry entry = metadata[i];
object.addMetadata(entry.getName(), entry.getValue());
}
object.setMetadataComplete(true);
return object;
} catch (RuntimeException e) {