示例#1
0
        public override IList <HistoricVariableInstance> executeList(CommandContext commandContext, Page page)
        {
            checkQueryOk();
            ensureVariablesInitialized();
            IList <HistoricVariableInstance> historicVariableInstances = commandContext.HistoricVariableInstanceManager.findHistoricVariableInstancesByQueryCriteria(this, page);

            if (historicVariableInstances != null)
            {
                foreach (HistoricVariableInstance historicVariableInstance in historicVariableInstances)
                {
                    HistoricVariableInstanceEntity variableInstanceEntity = (HistoricVariableInstanceEntity)historicVariableInstance;
                    if (shouldFetchValue(variableInstanceEntity))
                    {
                        try
                        {
                            variableInstanceEntity.getTypedValue(isCustomObjectDeserializationEnabled);
                        }
                        catch (Exception t)
                        {
                            // do not fail if one of the variables fails to load
                            LOG.exceptionWhileGettingValueForVariable(t);
                        }
                    }
                }
            }
            return(historicVariableInstances);
        }
示例#2
0
        public override IList <HistoricVariableInstance> executeList(CommandContext commandContext, IDictionary <string, object> parameterMap, int firstResult, int maxResults)
        {
            IList <HistoricVariableInstance> historicVariableInstances = commandContext.HistoricVariableInstanceManager.findHistoricVariableInstancesByNativeQuery(parameterMap, firstResult, maxResults);

            if (historicVariableInstances != null)
            {
                foreach (HistoricVariableInstance historicVariableInstance in historicVariableInstances)
                {
                    HistoricVariableInstanceEntity variableInstanceEntity = (HistoricVariableInstanceEntity)historicVariableInstance;
                    try
                    {
                        variableInstanceEntity.getTypedValue(isCustomObjectDeserializationEnabled);
                    }
                    catch (Exception t)
                    {
                        // do not fail if one of the variables fails to load
                        LOG.exceptionWhileGettingValueForVariable(t);
                    }
                }
            }
            return(historicVariableInstances);
        }