protected override List <string> GetPendingSubmissionList(SpringBaseDao baseDao)
        {
            if (_useSubmissionHistoryTable)
            {
                ExceptionUtils.ThrowIfEmptyString(_submissionHistoryTableName, "_submissionHistoryTableName");
                ExceptionUtils.ThrowIfEmptyString(_submissionHistoryTableProcessingStatusName, "_submissionHistoryTableProcessingStatusName");
                ExceptionUtils.ThrowIfEmptyString(_submissionHistoryTablePkName, "_submissionHistoryTableTransactionIdName");
                ExceptionUtils.ThrowIfEmptyString(_submissionHistorySubmissionType, "_submissionHistorySubmissionType");

                List <string> recordIdList = null;
                baseDao.DoSimpleQueryWithRowCallbackDelegate(
                    _submissionHistoryTableName,
                    _submissionHistoryTableProcessingStatusName + ";SUBMISSIONTYPE",
                    new object[] { EnumUtils.ToDescription(CDX_Processing_Status.Pending), _submissionHistorySubmissionType },
                    _submissionHistoryTablePkName,
                    delegate(IDataReader reader)
                {
                    if (recordIdList == null)
                    {
                        recordIdList = new List <string>();
                    }
                    recordIdList.Add(reader.GetString(0));
                });
                return(recordIdList);
            }
            return(null);
        }
예제 #2
0
        public static SubmissionTrackingDataType GetActiveSubmissionTrackingElement(SpringBaseDao baseDao, string pk)
        {
            SubmissionTrackingDataType data = null;

            baseDao.DoSimpleQueryWithRowCallbackDelegate(TABLE_NAME, PK_COLUMN, pk, LOAD_COLUMNS, delegate(IDataReader reader)
            {
                int index = 0;
                data      = new SubmissionTrackingDataType();

                data.ETLCompletionDateTime       = GetNullableDateTime(reader, ref index, out data.ETLCompletionDateTimeSpecified);
                data.DETChangeCompletionDateTime = GetNullableDateTime(reader, ref index, out data.DETChangeCompletionDateTimeSpecified);
                data.SubmissionDateTime          = GetNullableDateTime(reader, ref index, out data.SubmissionDateTimeSpecified);
                data.SubmissionTransactionId     = GetNullableString(reader, ref index);
                data.SubmissionTransactionStatus = GetNullableEnum <TransactionStatusCode>(reader, ref index, out data.SubmissionTransactionStatusSpecified);
                data.SubmissionStatusDateTime    = GetNullableDateTime(reader, ref index, out data.SubmissionStatusDateTimeSpecified);
                data.ResponseParseDateTime       = GetNullableDateTime(reader, ref index, out data.ResponseParseDateTimeSpecified);
                data.WorkflowStatus        = GetEnum <TransactionStatusCode>(reader, ref index);
                data.WorkflowStatusMessage = GetNullableString(reader, ref index);
            });
            if (data == null)
            {
                throw new ArgException("Could not find data in the {0} table with PK {1}", TABLE_NAME, pk);
            }
            return(data);
        }
예제 #3
0
 private void DoSimpleQueryWithRowCallbackDelegate(IDbCommand dbCommand, string semicolonSeparatedTableNames,
                                                   string semicolonSeparatedWhereColumnNames,
                                                   IList <object> whereValues,
                                                   string semicolonSeparatedColumnNames,
                                                   RowCallbackDelegate callback)
 {
     _dao.DoSimpleQueryWithRowCallbackDelegate(semicolonSeparatedTableNames, semicolonSeparatedWhereColumnNames, whereValues,
                                               semicolonSeparatedColumnNames, callback);
 }
예제 #4
0
        public static IList <string> GetActiveSubmissionTrackingElementPKs(SpringBaseDao baseDao)
        {
            List <string> pks = null;

            baseDao.DoSimpleQueryWithRowCallbackDelegate(TABLE_NAME, "WORKFLOW_STAT NOT " + FINISHED_STATUS_IN_CLAUSE, null, null, PK_COLUMN, delegate(IDataReader reader)
            {
                string pk = reader.GetString(0);
                CollectionUtils.Add(pk, ref pks);
            });
            return(pks);
        }
        protected SubmittedDocumentList GetSubmittedDocumentList()
        {
            SubmittedDocumentList list = new SubmittedDocumentList();

            List <SubmittedDocument> documents = new List <SubmittedDocument>();

            string triFlowId = _flowManager.GetDataFlowIdByName("TRI");

            string queryString;

            object[] queryParams;

            if (_transactionStatus == CommonTransactionStatusCode.Unknown)
            {
                queryString = "FlowId;WebMethod;ModifiedOn >=";
                queryParams = new object[] { triFlowId, NodeMethod.Submit.ToString(), _submissionDate };
            }
            else
            {
                queryString = "FlowId;WebMethod;Status;ModifiedOn >=";
                queryParams = new object[] { triFlowId, NodeMethod.Submit.ToString(), _transactionStatus.ToString(), _submissionDate };
            }

            _baseDao.DoSimpleQueryWithRowCallbackDelegate(
                "NTransaction", queryString, queryParams,
                "ModifiedOn DESC", "Id;ModifiedOn",
                delegate(IDataReader reader)
            {
                SubmittedDocument doc = new SubmittedDocument();
                doc.TransactionID     = reader.GetString(0);
                doc.ReceivedDate      = reader.GetDateTime(1);
                documents.Add(doc);
            });

            TrimListToRequestSize(_dataRequest, documents);

            list.SubmittedDocuments = documents.ToArray();

            return(list);
        }