/// <summary>
        /// Makes a deep copy of the current DojoTestListJournalEntryType.
        /// </summary>
        /// <returns> A new DojoTestListJournalEntryType object reflecting the cloned DojoTestListJournalEntryType object.</returns>
        public DojoTestListJournalEntryType Copy()
        {
            DojoTestListJournalEntryType dojoTestListJournalEntryType = new DojoTestListJournalEntryType();

            CopyTo(dojoTestListJournalEntryType);
            return(dojoTestListJournalEntryType);
        }
        /// <summary>
        /// Makes a deep copy of the current DojoTestListJournalEntryType.
        /// </summary>
        /// <returns> A new DojoTestListJournalEntryType object reflecting the cloned DojoTestListJournalEntryType object.</returns>
        /// <param name="isolation">Placeholders are used to isolate the DojoTestListJournalEntryType from its children.</param>
        public DojoTestListJournalEntryType Copy(bool isolation)
        {
            DojoTestListJournalEntryType dojoTestListJournalEntryType = new DojoTestListJournalEntryType();

            CopyTo(dojoTestListJournalEntryType, isolation);
            return(dojoTestListJournalEntryType);
        }
        public static DojoTestListJournalEntryType NewPlaceHolder(int iD)
        {
            DojoTestListJournalEntryType dojoTestListJournalEntryType = new DojoTestListJournalEntryType();

            dojoTestListJournalEntryType.iD            = iD;
            dojoTestListJournalEntryType.isPlaceHolder = true;
            dojoTestListJournalEntryType.isSynced      = true;
            return(dojoTestListJournalEntryType);
        }
        /// <summary>
        /// Duplicates DojoTestListJournalEntryType object into a database; may or may not be the same database
        /// as the parent object.
        /// </summary>
        /// <returns> A new DojoTestListJournalEntryType object reflecting the replicated DojoTestListJournalEntryType object.</returns>
        public DojoTestListJournalEntryType Duplicate()
        {
            DojoTestListJournalEntryType clonedDojoTestListJournalEntryType = this.Clone();

            // Insert must be called after children are replicated!
            clonedDojoTestListJournalEntryType.iD       = DojoTestListJournalEntryTypeManager._insert(clonedDojoTestListJournalEntryType);
            clonedDojoTestListJournalEntryType.isSynced = true;
            return(clonedDojoTestListJournalEntryType);
        }
        /// <summary>
        /// Clones DojoTestListJournalEntryType object and clones child objects with cloning or replication.
        /// as the parent object.
        /// </summary>
        /// <returns> A new DojoTestListJournalEntryType object reflecting the replicated DojoTestListJournalEntryType object.</returns>
        public DojoTestListJournalEntryType Clone()
        {
            DojoTestListJournalEntryType clonedDojoTestListJournalEntryType = new DojoTestListJournalEntryType();

            clonedDojoTestListJournalEntryType.iD                  = iD;
            clonedDojoTestListJournalEntryType.isSynced            = isSynced;
            clonedDojoTestListJournalEntryType.name                = name;
            clonedDojoTestListJournalEntryType.description         = description;
            clonedDojoTestListJournalEntryType.orderNum            = orderNum;
            clonedDojoTestListJournalEntryType.eligible            = eligible;
            clonedDojoTestListJournalEntryType.failed              = failed;
            clonedDojoTestListJournalEntryType.passed              = passed;
            clonedDojoTestListJournalEntryType.certificateRequest  = certificateRequest;
            clonedDojoTestListJournalEntryType.certificatePending  = certificatePending;
            clonedDojoTestListJournalEntryType.certificateReceived = certificateReceived;
            clonedDojoTestListJournalEntryType.ineligible          = ineligible;


            if (onRemovedStatus != null)
            {
                clonedDojoTestListJournalEntryType.onRemovedStatus = onRemovedStatus;
            }

            if (onFailedStatus != null)
            {
                clonedDojoTestListJournalEntryType.onFailedStatus = onFailedStatus;
            }

            if (onPassedStatus != null)
            {
                clonedDojoTestListJournalEntryType.onPassedStatus = onPassedStatus;
            }

            if (onPromotedStatus != null)
            {
                clonedDojoTestListJournalEntryType.onPromotedStatus = onPromotedStatus;
            }

            if (onCertificateRequestedStatus != null)
            {
                clonedDojoTestListJournalEntryType.onCertificateRequestedStatus = onCertificateRequestedStatus;
            }

            if (onCertificatePendingStatus != null)
            {
                clonedDojoTestListJournalEntryType.onCertificatePendingStatus = onCertificatePendingStatus;
            }

            if (onCertificateReceivedStatus != null)
            {
                clonedDojoTestListJournalEntryType.onCertificateReceivedStatus = onCertificateReceivedStatus;
            }

            return(clonedDojoTestListJournalEntryType);
        }
        public void Remove(DojoTestListJournalEntryType value)
        {
            OnCollectionChanged(EventArgs.Empty);
            int index = IndexOf(value);

            if (index == -1)
            {
                throw(new Exception("DojoTestListJournalEntryType not found in collection."));
            }
            RemoveAt(index);
        }
 public int IndexOf(DojoTestListJournalEntryType value)
 {
     lock (this)
     {
         for (int x = 0; x < count; x++)
         {
             if (DojoTestListJournalEntryTypeArray[x].Equals(value))
             {
                 return(x);
             }
         }
         return(-1);
     }
 }
 public int Add(DojoTestListJournalEntryType value)
 {
     OnCollectionChanged(EventArgs.Empty);
     lock (this)
     {
         count++;
         // Resize the array if the count is greater than the length
         // of the array.
         if (count > DojoTestListJournalEntryTypeArray.GetUpperBound(0) + 1)
         {
             DojoTestListJournalEntryType[] tempDojoTestListJournalEntryTypeArray = new DojoTestListJournalEntryType[count * 2];
             Array.Copy(DojoTestListJournalEntryTypeArray, tempDojoTestListJournalEntryTypeArray, count - 1);
             DojoTestListJournalEntryTypeArray = tempDojoTestListJournalEntryTypeArray;
         }
         DojoTestListJournalEntryTypeArray[count - 1] = value;
     }
     return(count - 1);
 }
 public void Insert(int index, DojoTestListJournalEntryType value)
 {
     OnCollectionChanged(EventArgs.Empty);
     lock (this)
     {
         count++;
         // Resize the array if the count is greater than the length
         // of the array.
         if (count > DojoTestListJournalEntryTypeArray.GetUpperBound(0) + 1)
         {
             DojoTestListJournalEntryType[] tempDojoTestListJournalEntryTypeArray = new DojoTestListJournalEntryType[count * 2];
             Array.Copy(DojoTestListJournalEntryTypeArray, tempDojoTestListJournalEntryTypeArray, count - 1);
             DojoTestListJournalEntryTypeArray = tempDojoTestListJournalEntryTypeArray;
         }
         for (int x = index + 1; x == count - 2; x++)
         {
             DojoTestListJournalEntryTypeArray[x] = DojoTestListJournalEntryTypeArray[x - 1];
         }
         DojoTestListJournalEntryTypeArray[index] = value;
     }
 }
 /// <summary>
 /// Compares the object's ID to another object's ID.
 /// </summary>
 public int CompareTo(DojoTestListJournalEntryType dojoTestListJournalEntryType)
 {
     return(this.iD - dojoTestListJournalEntryType.iD);
 }
        /// <summary>
        /// Compares the object's ID to another object's ID.
        /// </summary>
        int IComparable.CompareTo(object obj)
        {
            DojoTestListJournalEntryType dojoTestListJournalEntryType = (DojoTestListJournalEntryType)obj;

            return(this.iD - dojoTestListJournalEntryType.iD);
        }
 /// <summary>
 /// Deep copies the current DojoTestListJournalEntryType to another instance of DojoTestListJournalEntryType.
 /// </summary>
 /// <param name="DojoTestListJournalEntryType">The DojoTestListJournalEntryType to copy to.</param>
 /// <param name="isolation">Placeholders are used to isolate the DojoTestListJournalEntryType from its children.</param>
 public void CopyTo(DojoTestListJournalEntryType dojoTestListJournalEntryType, bool isolation)
 {
     dojoTestListJournalEntryType.iD                  = iD;
     dojoTestListJournalEntryType.isPlaceHolder       = isPlaceHolder;
     dojoTestListJournalEntryType.isSynced            = isSynced;
     dojoTestListJournalEntryType.name                = name;
     dojoTestListJournalEntryType.description         = description;
     dojoTestListJournalEntryType.orderNum            = orderNum;
     dojoTestListJournalEntryType.eligible            = eligible;
     dojoTestListJournalEntryType.failed              = failed;
     dojoTestListJournalEntryType.passed              = passed;
     dojoTestListJournalEntryType.certificateRequest  = certificateRequest;
     dojoTestListJournalEntryType.certificatePending  = certificatePending;
     dojoTestListJournalEntryType.certificateReceived = certificateReceived;
     dojoTestListJournalEntryType.ineligible          = ineligible;
     if (onRemovedStatus != null)
     {
         if (isolation)
         {
             dojoTestListJournalEntryType.onRemovedStatus = onRemovedStatus.NewPlaceHolder();
         }
         else
         {
             dojoTestListJournalEntryType.onRemovedStatus = onRemovedStatus.Copy(false);
         }
     }
     if (onFailedStatus != null)
     {
         if (isolation)
         {
             dojoTestListJournalEntryType.onFailedStatus = onFailedStatus.NewPlaceHolder();
         }
         else
         {
             dojoTestListJournalEntryType.onFailedStatus = onFailedStatus.Copy(false);
         }
     }
     if (onPassedStatus != null)
     {
         if (isolation)
         {
             dojoTestListJournalEntryType.onPassedStatus = onPassedStatus.NewPlaceHolder();
         }
         else
         {
             dojoTestListJournalEntryType.onPassedStatus = onPassedStatus.Copy(false);
         }
     }
     if (onPromotedStatus != null)
     {
         if (isolation)
         {
             dojoTestListJournalEntryType.onPromotedStatus = onPromotedStatus.NewPlaceHolder();
         }
         else
         {
             dojoTestListJournalEntryType.onPromotedStatus = onPromotedStatus.Copy(false);
         }
     }
     if (onCertificateRequestedStatus != null)
     {
         if (isolation)
         {
             dojoTestListJournalEntryType.onCertificateRequestedStatus = onCertificateRequestedStatus.NewPlaceHolder();
         }
         else
         {
             dojoTestListJournalEntryType.onCertificateRequestedStatus = onCertificateRequestedStatus.Copy(false);
         }
     }
     if (onCertificatePendingStatus != null)
     {
         if (isolation)
         {
             dojoTestListJournalEntryType.onCertificatePendingStatus = onCertificatePendingStatus.NewPlaceHolder();
         }
         else
         {
             dojoTestListJournalEntryType.onCertificatePendingStatus = onCertificatePendingStatus.Copy(false);
         }
     }
     if (onCertificateReceivedStatus != null)
     {
         if (isolation)
         {
             dojoTestListJournalEntryType.onCertificateReceivedStatus = onCertificateReceivedStatus.NewPlaceHolder();
         }
         else
         {
             dojoTestListJournalEntryType.onCertificateReceivedStatus = onCertificateReceivedStatus.Copy(false);
         }
     }
 }
 /// <summary>
 /// Deep copies the current DojoTestListJournalEntryType to another instance of DojoTestListJournalEntryType.
 /// This method does not provide isolated copies; use overriden method for this feature.
 /// </summary>
 /// <param name="DojoTestListJournalEntryType">The DojoTestListJournalEntryType to copy to.</param>
 public void CopyTo(DojoTestListJournalEntryType dojoTestListJournalEntryType)
 {
     CopyTo(dojoTestListJournalEntryType, false);
 }
 public bool Contains(DojoTestListJournalEntryType value)
 {
     return(IndexOf(value) != -1);
 }