Hi All,
I was required to change my query result to a string value in dfs...
I got a piece of code for doing the above operation but its showing an error.
QueryResult queryResultForId = queryService.Execute(queryForId, queryExForId, operationOptionsForId);
String strMaxValue = queryResultForId.getDataObjects().get(0).getProperties().get("required_value_from_database").getValueAsString();
The portion in the bold part is the error.
The following is the error that I am getting :
Error 1 'Emc.Documentum.FS.DataModel.Core.Query.QueryResult' does not contain a definition for 'getDataObjects' and no extension method 'getDataObjects' accepting a first argument of type 'Emc.Documentum.FS.DataModel.Core.Query.QueryResult' could be found (are you missing a using directive or an assembly reference?)
and my QueryResult class has the following piece of code
using Emc.Documentum.FS.DataModel.Core;
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
namespace Emc.Documentum.FS.DataModel.Core.Query
{
[XmlType(Namespace = "http://query.core.datamodel.fs.documentum.emc.com/")]
public class QueryResult
{
public QueryResult();
public QueryResult(DataPackage dataPackage);
public QueryResult(string queryId);
public QueryResult(string queryId, DataPackage dataPackage);
[XmlIgnore]
public List<DataObject> DataObjects { get; set; }
[XmlElement("dataPackage", Order = 0)]
public DataPackage DataPackage { get; set; }
[XmlAttribute("queryId")]
public string QueryId { get; set; }
[XmlElement("queryStatus", Order = 1)]
public QueryStatus QueryStatus { get; set; }
public void AddDataObject(DataObject dataObject);
}
}
Can someone tell me what do I need to add in QueryResult class for this code to work?