Beispiel #1
0
        /// <summary>ArchiveChildrens a Issuer record.</summary>
        /// <param name="transaction">Commits or rejects a set of commands as a unit</param>
        /// <param name="rowVersion">the version number of this row.</param>
        /// <param name="issuerId">The value for the IssuerId column.</param>
        /// <param name="archive">true to archive the object, false to unarchive it.</param>
        internal static void ArchiveChildren(AdoTransaction adoTransaction, SqlTransaction sqlTransaction, long rowVersion, int issuerId)
        {
            // Accessor for the Issuer Table.
            ServerDataModel.IssuerDataTable issuerTable = ServerDataModel.Issuer;
            // This record can be used to iterate through all the children.
            ServerDataModel.IssuerRow issuerRow = issuerTable.FindByIssuerId(issuerId);
            // Archive the child records.
            for (int index = 0; (index < issuerRow.GetDebtRows().Length); index = (index + 1))
            {
                ServerDataModel.DebtRow childDebtRow = issuerRow.GetDebtRows()[index];
                Debt.ArchiveChildren(adoTransaction, sqlTransaction, childDebtRow.RowVersion, childDebtRow.DebtId);
            }
            // Increment the row version
            rowVersion = ServerDataModel.RowVersion.Increment();
            // Delete the record in the ADO database.
            issuerRow[issuerTable.RowVersionColumn] = rowVersion;
            adoTransaction.DataRows.Add(issuerRow);
            issuerRow.Delete();
            // Archive the record in the SQL database.
            SqlCommand sqlCommand = new SqlCommand("update \"Issuer\" set \"IsArchived\" = 1 where \"IssuerId\"=@issuerId");

            sqlCommand.Connection  = sqlTransaction.Connection;
            sqlCommand.Transaction = sqlTransaction;
            sqlCommand.Parameters.Add(new SqlParameter("@issuerId", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, issuerId));
            sqlCommand.ExecuteNonQuery();
        }
Beispiel #2
0
        /// <summary>Archives a DebtType record.</summary>
        /// <param name="transaction">Commits or rejects a set of commands as a unit</param>
        /// <param name="RowVersion">The version number of this row.</param>
        /// <param name="debtTypeCode">The value for the DebtTypeCode column.</param>
        /// <param name="archive">true to archive the object, false to unarchive it.</param>
        public static void Archive(AdoTransaction adoTransaction, SqlTransaction sqlTransaction, long rowVersion, int debtTypeCode)
        {
            // Accessor for the DebtType Table.
            ServerDataModel.DebtTypeDataTable debtTypeTable = ServerDataModel.DebtType;
            // Rule #1: Make sure the record exists before updating it.
            ServerDataModel.DebtTypeRow debtTypeRow = debtTypeTable.FindByDebtTypeCode(debtTypeCode);
            if ((debtTypeRow == null))
            {
                throw new Exception(string.Format("The DebtType table does not have an element identified by {0}", debtTypeCode));
            }
            // Rule #2: Optimistic Concurrency Check
            if ((debtTypeRow.RowVersion != rowVersion))
            {
                throw new System.Exception("This record is busy.  Please try again later.");
            }
            // Archive the child records.
            for (int index = 0; (index < debtTypeRow.GetDebtRows().Length); index = (index + 1))
            {
                ServerDataModel.DebtRow childDebtRow = debtTypeRow.GetDebtRows()[index];
                Debt.ArchiveChildren(adoTransaction, sqlTransaction, childDebtRow.RowVersion, childDebtRow.DebtId);
            }
            // Increment the row version
            rowVersion = ServerDataModel.RowVersion.Increment();
            // Delete the record in the ADO database.
            debtTypeRow[debtTypeTable.RowVersionColumn] = rowVersion;
            adoTransaction.DataRows.Add(debtTypeRow);
            debtTypeRow.Delete();
            // Archive the record in the SQL database.
            SqlCommand sqlCommand = new SqlCommand("update \"DebtType\" set \"IsArchived\" = 1 where \"DebtTypeCode\"=@debtTypeCode");

            sqlCommand.Connection  = sqlTransaction.Connection;
            sqlCommand.Transaction = sqlTransaction;
            sqlCommand.Parameters.Add(new SqlParameter("@debtTypeCode", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, debtTypeCode));
            sqlCommand.ExecuteNonQuery();
        }
Beispiel #3
0
        /// <summary>
        /// Authorizes a Debt to be returned to the client.
        /// </summary>
        /// <param name="userDataRow">Identifies the current user.</param>
        /// <param name="debtDataRow">The record to be tested for authorization.</param>
        /// <returns>true if the record belongs in the user's hierarchy.</returns>
        public static bool FilterDebt(DataRow userDataRow, DataRow debtDataRow)
        {
            // This will test the record and return true if it belongs to the hierarchies this user is authorized to view.  False
            // if the record should not be included in the user's data model.
            ServerDataModel.UserRow userRow = (ServerDataModel.UserRow)userDataRow;
            ServerDataModel.DebtRow debtRow = (ServerDataModel.DebtRow)debtDataRow;

            return(true);
        }
Beispiel #4
0
 /// <summary>Archives a Debt record using Metadata Parameters.</summary>
 /// <param name="transaction">Contains the parameters and exceptions for this command.</param>
 public new static void Archive(ParameterList parameters)
 {
     // Accessor for the Debt Table.
     ServerDataModel.DebtDataTable debtTable = ServerDataModel.Debt;
     // Extract the parameters from the command batch.
     AdoTransaction adoTransaction = parameters["adoTransaction"];
     SqlTransaction sqlTransaction = parameters["sqlTransaction"];
     object configurationId = parameters["configurationId"].Value;
     string externalDebtId = parameters["debtId"];
     // The row versioning is largely disabled for external operations.  The value is returned to the caller in the
     // event it's needed for operations within the batch.
     long rowVersion = long.MinValue;
     // Find the internal identifier using the primary key elements.
     // identifier is used to determine if a record exists with the same key.
     int debtId = Debt.FindRequiredKey(configurationId, "debtId", externalDebtId);
     // This disables the concurrency checking logic by finding the current row version and passing it to the
     // internal method.
     ServerDataModel.DebtRow debtRow = debtTable.FindByDebtId(debtId);
     rowVersion = ((long)(debtRow[debtTable.RowVersionColumn]));
     // Call the internal method to complete the operation.
     MarkThree.Quasar.Core.Debt.Archive(adoTransaction, sqlTransaction, rowVersion, debtId);
 }
Beispiel #5
0
        /// <summary>ArchiveChildrens a Security record.</summary>
        /// <param name="transaction">Commits or rejects a set of commands as a unit</param>
        /// <param name="rowVersion">the version number of this row.</param>
        /// <param name="securityId">The value for the SecurityId column.</param>
        /// <param name="archive">true to archive the object, false to unarchive it.</param>
        internal static void ArchiveChildren(AdoTransaction adoTransaction, SqlTransaction sqlTransaction, long rowVersion, int securityId)
        {
            // Accessor for the Security Table.
            ServerDataModel.SecurityDataTable securityTable = ServerDataModel.Security;
            // This record can be used to iterate through all the children.
            ServerDataModel.SecurityRow securityRow = securityTable.FindBySecurityId(securityId);
            // Archive the child records.
            for (int index = 0; (index < securityRow.GetAccountRows().Length); index = (index + 1))
            {
                ServerDataModel.AccountRow childAccountRow = securityRow.GetAccountRows()[index];
                Account.ArchiveChildren(adoTransaction, sqlTransaction, childAccountRow.RowVersion, childAccountRow.AccountId);
            }
            for (int index = 0; (index < securityRow.GetAllocationRowsByFKSecurityAllocationSecurityId().Length); index = (index + 1))
            {
                ServerDataModel.AllocationRow childAllocationRow = securityRow.GetAllocationRowsByFKSecurityAllocationSecurityId()[index];
                Allocation.Archive(adoTransaction, sqlTransaction, childAllocationRow.RowVersion, childAllocationRow.AllocationId);
            }
            for (int index = 0; (index < securityRow.GetAllocationRowsByFKSecurityAllocationSettlementId().Length); index = (index + 1))
            {
                ServerDataModel.AllocationRow childAllocationRow = securityRow.GetAllocationRowsByFKSecurityAllocationSettlementId()[index];
                Allocation.Archive(adoTransaction, sqlTransaction, childAllocationRow.RowVersion, childAllocationRow.AllocationId);
            }
            for (int index = 0; (index < securityRow.GetBlockOrderRowsByFKSecurityBlockOrderSecurityId().Length); index = (index + 1))
            {
                ServerDataModel.BlockOrderRow childBlockOrderRow = securityRow.GetBlockOrderRowsByFKSecurityBlockOrderSecurityId()[index];
                BlockOrder.Archive(adoTransaction, sqlTransaction, childBlockOrderRow.RowVersion, childBlockOrderRow.BlockOrderId);
            }
            for (int index = 0; (index < securityRow.GetBlockOrderRowsByFKSecurityBlockOrderSettlementId().Length); index = (index + 1))
            {
                ServerDataModel.BlockOrderRow childBlockOrderRow = securityRow.GetBlockOrderRowsByFKSecurityBlockOrderSettlementId()[index];
                BlockOrder.Archive(adoTransaction, sqlTransaction, childBlockOrderRow.RowVersion, childBlockOrderRow.BlockOrderId);
            }
            for (int index = 0; (index < securityRow.GetBlotterMapRows().Length); index = (index + 1))
            {
                ServerDataModel.BlotterMapRow childBlotterMapRow = securityRow.GetBlotterMapRows()[index];
                BlotterMap.Archive(adoTransaction, sqlTransaction, childBlotterMapRow.RowVersion, childBlotterMapRow.BlotterMapId);
            }
            for (int index = 0; (index < securityRow.GetDebtRowsByFKSecurityDebtDebtId().Length); index = (index + 1))
            {
                ServerDataModel.DebtRow childDebtRow = securityRow.GetDebtRowsByFKSecurityDebtDebtId()[index];
                Debt.ArchiveChildren(adoTransaction, sqlTransaction, childDebtRow.RowVersion, childDebtRow.DebtId);
            }
            for (int index = 0; (index < securityRow.GetDebtRowsByFKSecurityDebtSettlementId().Length); index = (index + 1))
            {
                ServerDataModel.DebtRow childDebtRow = securityRow.GetDebtRowsByFKSecurityDebtSettlementId()[index];
                Debt.ArchiveChildren(adoTransaction, sqlTransaction, childDebtRow.RowVersion, childDebtRow.DebtId);
            }
            for (int index = 0; (index < securityRow.GetCurrencyRows().Length); index = (index + 1))
            {
                ServerDataModel.CurrencyRow childCurrencyRow = securityRow.GetCurrencyRows()[index];
                Currency.ArchiveChildren(adoTransaction, sqlTransaction, childCurrencyRow.RowVersion, childCurrencyRow.CurrencyId);
            }
            for (int index = 0; (index < securityRow.GetEquityRowsByFKSecurityEquityEquityId().Length); index = (index + 1))
            {
                ServerDataModel.EquityRow childEquityRow = securityRow.GetEquityRowsByFKSecurityEquityEquityId()[index];
                Equity.ArchiveChildren(adoTransaction, sqlTransaction, childEquityRow.RowVersion, childEquityRow.EquityId);
            }
            for (int index = 0; (index < securityRow.GetEquityRowsByFKSecurityEquitySettlementId().Length); index = (index + 1))
            {
                ServerDataModel.EquityRow childEquityRow = securityRow.GetEquityRowsByFKSecurityEquitySettlementId()[index];
                Equity.ArchiveChildren(adoTransaction, sqlTransaction, childEquityRow.RowVersion, childEquityRow.EquityId);
            }
            for (int index = 0; (index < securityRow.GetOrderRowsByFKSecurityOrderSecurityId().Length); index = (index + 1))
            {
                ServerDataModel.OrderRow childOrderRow = securityRow.GetOrderRowsByFKSecurityOrderSecurityId()[index];
                Order.Archive(adoTransaction, sqlTransaction, childOrderRow.RowVersion, childOrderRow.OrderId);
            }
            for (int index = 0; (index < securityRow.GetOrderRowsByFKSecurityOrderSettlementId().Length); index = (index + 1))
            {
                ServerDataModel.OrderRow childOrderRow = securityRow.GetOrderRowsByFKSecurityOrderSettlementId()[index];
                Order.Archive(adoTransaction, sqlTransaction, childOrderRow.RowVersion, childOrderRow.OrderId);
            }
            for (int index = 0; (index < securityRow.GetPositionRows().Length); index = (index + 1))
            {
                ServerDataModel.PositionRow childPositionRow = securityRow.GetPositionRows()[index];
                Position.Archive(adoTransaction, sqlTransaction, childPositionRow.RowVersion, childPositionRow.AccountId, childPositionRow.SecurityId, childPositionRow.PositionTypeCode);
            }
            for (int index = 0; (index < securityRow.GetPositionTargetRows().Length); index = (index + 1))
            {
                ServerDataModel.PositionTargetRow childPositionTargetRow = securityRow.GetPositionTargetRows()[index];
                PositionTarget.Archive(adoTransaction, sqlTransaction, childPositionTargetRow.RowVersion, childPositionTargetRow.ModelId, childPositionTargetRow.SecurityId, childPositionTargetRow.PositionTypeCode);
            }
            for (int index = 0; (index < securityRow.GetPriceRows().Length); index = (index + 1))
            {
                ServerDataModel.PriceRow childPriceRow = securityRow.GetPriceRows()[index];
                Price.Archive(adoTransaction, sqlTransaction, childPriceRow.RowVersion, childPriceRow.SecurityId, childPriceRow.CurrencyId);
            }
            for (int index = 0; (index < securityRow.GetProposedOrderRowsByFKSecurityProposedOrderSecurityId().Length); index = (index + 1))
            {
                ServerDataModel.ProposedOrderRow childProposedOrderRow = securityRow.GetProposedOrderRowsByFKSecurityProposedOrderSecurityId()[index];
                ProposedOrder.Archive(adoTransaction, sqlTransaction, childProposedOrderRow.RowVersion, childProposedOrderRow.ProposedOrderId);
            }
            for (int index = 0; (index < securityRow.GetProposedOrderRowsByFKSecurityProposedOrderSettlementId().Length); index = (index + 1))
            {
                ServerDataModel.ProposedOrderRow childProposedOrderRow = securityRow.GetProposedOrderRowsByFKSecurityProposedOrderSettlementId()[index];
                ProposedOrder.Archive(adoTransaction, sqlTransaction, childProposedOrderRow.RowVersion, childProposedOrderRow.ProposedOrderId);
            }
            for (int index = 0; (index < securityRow.GetTaxLotRows().Length); index = (index + 1))
            {
                ServerDataModel.TaxLotRow childTaxLotRow = securityRow.GetTaxLotRows()[index];
                TaxLot.Archive(adoTransaction, sqlTransaction, childTaxLotRow.RowVersion, childTaxLotRow.TaxLotId);
            }
            for (int index = 0; (index < securityRow.GetViolationRows().Length); index = (index + 1))
            {
                ServerDataModel.ViolationRow childViolationRow = securityRow.GetViolationRows()[index];
                Violation.Archive(adoTransaction, sqlTransaction, childViolationRow.RowVersion, childViolationRow.ViolationId);
            }
            // Increment the row version
            rowVersion = ServerDataModel.RowVersion.Increment();
            // Delete the record in the ADO database.
            securityRow[securityTable.RowVersionColumn] = rowVersion;
            adoTransaction.DataRows.Add(securityRow);
            securityRow.Delete();
            // Archive the record in the SQL database.
            SqlCommand sqlCommand = new SqlCommand("update \"Security\" set \"IsArchived\" = 1 where \"SecurityId\"=@securityId");

            sqlCommand.Connection  = sqlTransaction.Connection;
            sqlCommand.Transaction = sqlTransaction;
            sqlCommand.Parameters.Add(new SqlParameter("@securityId", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, securityId));
            sqlCommand.ExecuteNonQuery();
        }
Beispiel #6
0
 /// <summary>Loads a Debt record using Metadata Parameters.</summary>
 /// <param name="transaction">Contains the parameters and exceptions for this command.</param>
 public new static void Load(ParameterList parameters)
 {
     // Accessor for the Debt Table.
     ServerDataModel.DebtDataTable debtTable = ServerDataModel.Debt;
     // Extract the parameters from the command batch.
     AdoTransaction adoTransaction = parameters["adoTransaction"];
     SqlTransaction sqlTransaction = parameters["sqlTransaction"];
     object configurationId = parameters["configurationId"].Value;
     object description = parameters["description"].Value;
     object groupPermission = parameters["groupPermission"].Value;
     object hidden = parameters["hidden"].Value;
     string name = parameters["name"];
     object owner = parameters["owner"].Value;
     object ownerPermission = parameters["ownerPermission"].Value;
     object readOnly = parameters["readOnly"].Value;
     object worldPermission = parameters["worldPermission"].Value;
     string externalCountryId = parameters["countryId"];
     object externalTypeCode = parameters["typeCode"].Value;
     object symbol = parameters["symbol"].Value;
     string externalDebtId = parameters["debtId"];
     object externalIssuerId = parameters["issuerId"].Value;
     string externalSettlementId = parameters["settlementId"];
     object externalSecurityTypeCode = parameters["securityTypeCode"].Value;
     string externalDebtTypeCode = parameters["debtTypeCode"];
     object priceFactor = parameters["priceFactor"].Value;
     object quantityFactor = parameters["quantityFactor"].Value;
     object faceOutstanding = parameters["faceOutstanding"].Value;
     decimal coupon = parameters["coupon"];
     System.DateTime maturityDate = parameters["maturityDate"];
     object datedDate = parameters["datedDate"].Value;
     object firstCoupon = parameters["firstCoupon"].Value;
     object frequency = parameters["frequency"].Value;
     object redemptionValue = parameters["redemptionValue"].Value;
     object incomeTaxRate = parameters["incomeTaxRate"].Value;
     object capitalGainsTaxRate = parameters["capitalGainsTaxRate"].Value;
     object cutoffPeriod = parameters["cutoffPeriod"].Value;
     object issuePrice = parameters["issuePrice"].Value;
     object trueYield = parameters["trueYield"].Value;
     object weekendCode = parameters["weekendCode"].Value;
     object exdividendDays = parameters["exdividendDays"].Value;
     object rating0 = parameters["rating0"].Value;
     object rating1 = parameters["rating1"].Value;
     object rating2 = parameters["rating2"].Value;
     object rating3 = parameters["rating3"].Value;
     // The row versioning is largely disabled for external operations.  The value is returned to the caller in the
     // event it's needed for operations within the batch.
     long rowVersion = long.MinValue;
     // Resolve External Identifiers
     int countryId = Country.FindRequiredKey(configurationId, "countryId", externalCountryId);
     object typeCode = Type.FindOptionalKey(configurationId, "typeCode", externalTypeCode);
     int debtId = Security.FindKey(configurationId, "debtId", externalDebtId);
     object issuerId = Issuer.FindOptionalKey(configurationId, "issuerId", externalIssuerId);
     int settlementId = Security.FindRequiredKey(configurationId, "settlementId", externalSettlementId);
     object securityTypeCode = SecurityType.FindOptionalKey(configurationId, "securityTypeCode", externalSecurityTypeCode);
     int debtTypeCode = DebtType.FindRequiredKey(configurationId, "debtTypeCode", externalDebtTypeCode);
     ServerDataModel.DebtRow debtRow = debtTable.FindByDebtId(debtId);
     // The load operation will create a record if it doesn't exist, or update an existing record.  The external
     // identifier is used to determine if a record exists with the same key.
     if ((debtRow == null))
     {
         // Populate the 'externalId' varaibles so that the external identifier can be used to find the row when an
         // external method is called with the same 'configurationId' parameter.
         int externalKeyIndex = Debt.GetExternalKeyIndex(configurationId, "debtId");
         object[] externalIdArray = new object[8];
         externalIdArray[externalKeyIndex] = externalDebtId;
         object externalId0 = externalIdArray[0];
         object externalId1 = externalIdArray[1];
         object externalId2 = externalIdArray[2];
         object externalId3 = externalIdArray[3];
         object externalId4 = externalIdArray[4];
         object externalId5 = externalIdArray[5];
         object externalId6 = externalIdArray[6];
         object externalId7 = externalIdArray[7];
         // Call the internal method to complete the operation.
         MarkThree.Quasar.Core.Debt.Insert(adoTransaction, sqlTransaction, ref rowVersion, description, externalId0, externalId1, externalId2, externalId3, externalId4, externalId5, externalId6, externalId7, groupPermission, hidden, name, owner, ownerPermission, readOnly, worldPermission, countryId, typeCode, symbol, issuerId, settlementId, securityTypeCode, debtTypeCode, priceFactor, quantityFactor, faceOutstanding, coupon, maturityDate, datedDate, firstCoupon, frequency, redemptionValue, incomeTaxRate, capitalGainsTaxRate, cutoffPeriod, issuePrice, trueYield, weekendCode, exdividendDays, rating0, rating1, rating2, rating3);
     }
     else
     {
         // While the optimistic concurrency checking is disabled for the external methods, the internal methods
         // still need to perform the check.  This ncurrency checking logic by finding the current row version to be
         // will bypass the coused when the internal method is called.
         rowVersion = ((long)(debtRow[debtTable.RowVersionColumn]));
         // Call the internal method to complete the operation.
         MarkThree.Quasar.Core.Debt.Update(adoTransaction, sqlTransaction, ref rowVersion, description, null, null, null, null, null, null, null, null, groupPermission, hidden, name, owner, ownerPermission, readOnly, worldPermission, countryId, typeCode, symbol, debtId, issuerId, settlementId, securityTypeCode, debtTypeCode, priceFactor, quantityFactor, faceOutstanding, coupon, maturityDate, datedDate, firstCoupon, frequency, redemptionValue, incomeTaxRate, capitalGainsTaxRate, cutoffPeriod, issuePrice, trueYield, weekendCode, exdividendDays, rating0, rating1, rating2, rating3);
     }
     // Return values.
     parameters["rowVersion"] = rowVersion;
 }
Beispiel #7
0
 /// <summary>Updates a Debt record using Metadata Parameters.</summary>
 /// <param name="transaction">Contains the parameters and exceptions for this command.</param>
 public new static void Update(ParameterList parameters)
 {
     // Accessor for the Debt Table.
     ServerDataModel.DebtDataTable debtTable = ServerDataModel.Debt;
     // Extract the parameters from the command batch.
     AdoTransaction adoTransaction = parameters["adoTransaction"];
     SqlTransaction sqlTransaction = parameters["sqlTransaction"];
     object configurationId = parameters["configurationId"].Value;
     object description = parameters["description"].Value;
     object groupPermission = parameters["groupPermission"].Value;
     object hidden = parameters["hidden"].Value;
     object name = parameters["name"].Value;
     object owner = parameters["owner"].Value;
     object ownerPermission = parameters["ownerPermission"].Value;
     object readOnly = parameters["readOnly"].Value;
     object worldPermission = parameters["worldPermission"].Value;
     object externalCountryId = parameters["countryId"].Value;
     object externalTypeCode = parameters["typeCode"].Value;
     object symbol = parameters["symbol"].Value;
     string externalDebtId = ((string)(parameters["debtId"]));
     object externalIssuerId = parameters["issuerId"].Value;
     object externalSettlementId = parameters["settlementId"].Value;
     object externalSecurityTypeCode = parameters["securityTypeCode"].Value;
     object externalDebtTypeCode = parameters["debtTypeCode"].Value;
     object priceFactor = parameters["priceFactor"].Value;
     object quantityFactor = parameters["quantityFactor"].Value;
     object faceOutstanding = parameters["faceOutstanding"].Value;
     object coupon = parameters["coupon"].Value;
     object maturityDate = parameters["maturityDate"].Value;
     object datedDate = parameters["datedDate"].Value;
     object firstCoupon = parameters["firstCoupon"].Value;
     object frequency = parameters["frequency"].Value;
     object redemptionValue = parameters["redemptionValue"].Value;
     object incomeTaxRate = parameters["incomeTaxRate"].Value;
     object capitalGainsTaxRate = parameters["capitalGainsTaxRate"].Value;
     object cutoffPeriod = parameters["cutoffPeriod"].Value;
     object issuePrice = parameters["issuePrice"].Value;
     object trueYield = parameters["trueYield"].Value;
     object weekendCode = parameters["weekendCode"].Value;
     object exdividendDays = parameters["exdividendDays"].Value;
     object rating0 = parameters["rating0"].Value;
     object rating1 = parameters["rating1"].Value;
     object rating2 = parameters["rating2"].Value;
     object rating3 = parameters["rating3"].Value;
     // The row versioning is largely disabled for external operations.  The value is returned to the caller in the
     // event it's needed for operations within the batch.
     long rowVersion = long.MinValue;
     // Resolve External Identifiers
     object countryId = Country.FindOptionalKey(configurationId, "countryId", externalCountryId);
     object typeCode = Type.FindOptionalKey(configurationId, "typeCode", externalTypeCode);
     int debtId = Security.FindRequiredKey(configurationId, "debtId", externalDebtId);
     object issuerId = Issuer.FindOptionalKey(configurationId, "issuerId", externalIssuerId);
     object settlementId = Security.FindOptionalKey(configurationId, "settlementId", externalSettlementId);
     object securityTypeCode = SecurityType.FindOptionalKey(configurationId, "securityTypeCode", externalSecurityTypeCode);
     object debtTypeCode = DebtType.FindOptionalKey(configurationId, "debtTypeCode", externalDebtTypeCode);
     // This disables the concurrency checking logic by finding the current row version and passing it to the
     // internal method.
     ServerDataModel.DebtRow debtRow = debtTable.FindByDebtId(debtId);
     rowVersion = ((long)(debtRow[debtTable.RowVersionColumn]));
     // Call the internal method to complete the operation.
     MarkThree.Quasar.Core.Debt.Update(adoTransaction, sqlTransaction, ref rowVersion, description, null, null, null, null, null, null, null, null, groupPermission, hidden, name, owner, ownerPermission, readOnly, worldPermission, countryId, typeCode, symbol, debtId, issuerId, settlementId, securityTypeCode, debtTypeCode, priceFactor, quantityFactor, faceOutstanding, coupon, maturityDate, datedDate, firstCoupon, frequency, redemptionValue, incomeTaxRate, capitalGainsTaxRate, cutoffPeriod, issuePrice, trueYield, weekendCode, exdividendDays, rating0, rating1, rating2, rating3);
     // Return values.
     parameters["rowVersion"] = rowVersion;
 }