'use strict'; /* *+------------------------------------------------------------------------+ *| Licensed Materials - Property of IBM *| IBM Cognos Products: BI Dashboard *| (C) Copyright IBM Corp. 2018 *| *| US Government Users Restricted Rights - Use, duplication or disclosure *| restricted by GSA ADP Schedule Contract with IBM Corp. *+------------------------------------------------------------------------+ */ /** * This Class encapsulates result object which contains the * 1. Annotated result data returned from annotation execution service * 2. Annotation status (error/warning/message) including the overall predict title **/ define(['./QueryResultObject'], function (BaseClass) { 'use strict'; var QueryResultObject = BaseClass.extend({ _predictStatus: null, _predictDeco: null, init: function init(renderContext, resultData) { QueryResultObject.inherited('init', this, [renderContext]); this._predictStatus = resultData.predictStatus; this._predictDeco = resultData.deco; this._predictResults = resultData.predictResults; }, getStatus: function getStatus() { return this._predictStatus ? this._predictStatus.state : null; }, getErrors: function getErrors() { return this._predictStatus ? this._predictStatus.errors : null; }, getWarnings: function getWarnings() { return this._predictStatus ? this._predictStatus.warnings : null; }, getMessages: function getMessages() { return this._predictStatus ? this._predictStatus.messages : null; }, getPredictTitle: function getPredictTitle() { return this._predictStatus ? this._predictStatus.title : null; }, getStatisticalDetails: function getStatisticalDetails() { return this._predictResults && this._predictResults.statisticalDetails || []; }, isDataReordered: function isDataReordered() { return this._predictStatus && this._predictStatus.reordered; } }); return QueryResultObject; }); //# sourceMappingURL=QueryResultAnnotatedObject.js.map