Esempio n. 1
0
 public override void Remove(MISMO.Entities.AssetBase assetBase)
 {
     Asset a = assetBase as Asset;
     if (a != null)
         a._borrower = null;
     base.Remove (assetBase);
 }
Esempio n. 2
0
 /// <summary>
 /// Adds a new credit object to the collection with the specified source type and score values.
 /// </summary>
 /// <param name="sourceType">The credit repository source type.</param>
 /// <param name="creditScore">The credit score.</param>
 /// <returns>The position of the addition in the collection</returns>
 public int Add(MISMO.Enums.CreditRepositorySourceType sourceType, short creditScore)
 {
     AUS.CreditScore credscore = new AUS.CreditScore(_borrower);
     credscore.CreditRepositorySourceType = (short) sourceType;
     credscore.CreditScoreValue = creditScore;
     return this.Add(credscore);
 }
Esempio n. 3
0
 public override int Add(MISMO.Entities.AssetBase assetBase)
 {
     Asset a = assetBase as Asset;
     if (a != null)
         a._borrower = _borrower;
     return base.Add (assetBase);
 }
Esempio n. 4
0
        internal override void SetMembers(ref MISMO.Entities.PropertyBase data)
        {
            // make a call to the base to set the members for the base structures.
            base.SetMembers (ref data);

            // now since this object is set...we can get instance of the other data elements.

            // get the legal descriptions
            _legaldescs = this.GetLegalDescriptions();

            // get the parsed address if it exists
            MISMO.BusinessObjects.ParsedStreetAddresses parsedaddys = this.GetParsedStreetAddresses();
            if (parsedaddys != null && parsedaddys.Count > 0)
                _parsedaddress = parsedaddys[0];

            // get the valuations into the right object model
            MISMO.BusinessObjects.Valuations vals = this.GetValuations();
            MISMO.Entities.ValuationBase valbase = null;
            MISMO.BusinessObjects.AUS.Valuation val = null;

            if (vals != null && vals.Count > 0)
            {
                for(int i = 0, j = vals.Count; i<j; i++)
                {
                    val = new AUS.Valuation();
                    valbase = vals[i];

                    val.SetMembers(ref valbase);
                    _valuations.Add(val);
                }
            }

            // update the checksum
            this.RecalculateChecksum();
        }
Esempio n. 5
0
        internal override void SetMembers(ref MISMO.Entities.DataInformationBase data)
        {
            // call up to the base first
            base.SetMembers (ref data);

            // load up the data versions
            _dataversions = this.GetDataVersions();
            if (_dataversions == null) _dataversions = new DataVersions();

            // recalculate the checksum
            RecalculateChecksum();
        }
Esempio n. 6
0
        /// <summary>
        /// Sets the internal members with data from a compatible instance.
        /// </summary>
        /// <param name="data">The compatible object type.</param>
        internal override void SetMembers(ref MISMO.Entities.LoanPurposeBase data)
        {
            // first call up to base
            base.SetMembers (ref data);

            MISMO.BusinessObjects.ConstructionRefinanceDataCollection conscol = this.GetConstructionRefinanceDataCollection();
            if (conscol != null && conscol.Count > 0)
            {
                _consrefidata = conscol[0];
            }

            // now recalculate the checksum
            RecalculateChecksum();
        }
Esempio n. 7
0
 /// <summary>
 /// Gets or sets the credit score for the specified repository type.
 /// </summary>
 /// <remarks>
 /// If they do not exist, a -1 value is returned. Otherwise, the score itself is returned.
 /// </remarks>
 public short this[MISMO.Enums.CreditRepositorySourceType sourceType]
 {
     get
     {
         AUS.CreditScore score = this.GetByRepository(sourceType);
         return (score == null ? (short) -1 : score.CreditScoreValue);
     }
     set
     {
         AUS.CreditScore score = this.GetByRepository(sourceType);
         if (score == null)
         {
             this.Add(sourceType, value);
         }
     }
 }
        /// <summary>
        /// Sets the internal members with the data from a compatible type obect.
        /// </summary>
        /// <param name="data">The data to set internally.</param>
        internal override void SetMembers(ref MISMO.Entities.TransactionDetailBase data)
        {
            // first let the base do its work.
            base.SetMembers(ref data);

            // load up the purchase credit data
            _purchasecreditcol = this.GetPurchaseCreditCollection();

            // refactor the checksum
            RecalculateChecksum();
        }
Esempio n. 9
0
        /// <summary>
        /// Loads a loan object with the specified loan bytes.
        /// </summary>
        /// <param name="sourceType">The type of external file to load.</param>
        /// <param name="fileBytes">The data bytes of the file to load.</param>
        public virtual void Load(MISMO.Enums.ExternalFileType sourceType, byte[] fileBytes)
        {
            // error out if we do not have valid data
            if (fileBytes == null || fileBytes.Length == 0)
                throw new ArgumentException("Null byte data or zero length received. Unable to load from external file.", "fileBytes");

            if (sourceType != Enums.ExternalFileType.FannieMaeResidentialLoanData)
            {
                // we only support DU imports for now.
                throw new NotImplementedException("Support for that external file source type is has not been implemented.");
            }

            switch(sourceType)
            {
                case Enums.ExternalFileType.FannieMaeResidentialLoanData:
                {
                    LoadDU(fileBytes);
                    break;
                }
            }
        }
Esempio n. 10
0
        /// <summary>
        /// Loads a loan object with data from the external source file.
        /// </summary>
        /// <param name="sourceType">The external system type.</param>
        /// <param name="fileName">The full file name of the source to load.</param>
        public virtual void Load(MISMO.Enums.ExternalFileType sourceType, string fileName)
        {
            System.IO.FileInfo file = new System.IO.FileInfo(fileName);
            if (!file.Exists) throw new System.IO.FileNotFoundException("Could not find file.", fileName);

            System.IO.FileStream fs = file.OpenRead();
            byte[] filedat = new byte[fs.Length];
            fs.Read(filedat, 0, filedat.Length);
            fs.Close();

            Load(sourceType, filedat);
        }
        /// <summary>
        /// Set the members of the class with information from a compatible instance.
        /// </summary>
        /// <param name="data">The object to set members with.</param>
        internal override void SetMembers(ref MISMO.Entities.AdditionalCaseDataBase data)
        {
            // make a call to the base first.
            base.SetMembers (ref data);

            // load up the transmittal data
            MISMO.BusinessObjects.TransmittalDataCollection transcol = this.GetTransmittalDataCollection();
            if (transcol != null && transcol.Count > 0)
                _transmitdata = transcol[0];

            // load up the mortgage scores
            _mortgagescores = this.GetMortgageScores();

            // refactor the checksum
            RecalculateChecksum();
        }
Esempio n. 12
0
        public override void Remove(MISMO.Entities.CreditScoreBase creditScoreBase)
        {
            CreditScore score = creditScoreBase as CreditScore;
            score._borrower = null;

            base.Remove (creditScoreBase);
        }
Esempio n. 13
0
 /// <summary>
 /// Gets the first credit score from the collection by the specified repository source type.
 /// </summary>
 /// <param name="sourceType">The repository source type.</param>
 /// <returns>An AUS credit score object or null if the repository entry does not exist.</returns>
 public AUS.CreditScore GetByRepository(MISMO.Enums.CreditRepositorySourceType sourceType)
 {
     for(int i = 0, j = this.Count; i<j; i++)
     {
         AUS.CreditScore curscore = this[i] as AUS.CreditScore;
         if (curscore.CreditRepositorySourceType == (short) sourceType)
             return curscore;
     }
     return null;
 }
Esempio n. 14
0
 /// <summary>
 /// Adds a new credit score object to the collection of credit score objects.
 /// </summary>
 /// <param name="creditScoreBase">A credit score base object.</param>
 /// <returns>The position of the addition in the collection.</returns>
 public override int Add(MISMO.Entities.CreditScoreBase creditScoreBase)
 {
     if (creditScoreBase == null) throw new ArgumentNullException("creditScoreBase", "You may only a valid AUS.CreditScore object to the credit score collection.");
     CreditScore score = creditScoreBase as CreditScore;
     if (!Object.ReferenceEquals(score._borrower, this._borrower)) score._borrower = _borrower;
     return base.Add(creditScoreBase);
 }