public virtual void RemoveStopTimeDetails(StopTimeDetails __item) { if (__item != null && stopTimeDetails != null && stopTimeDetails.Contains(__item)) { stopTimeDetails.Remove(__item); } }
public virtual void AddStopTimeDetails(StopTimeDetails __item) { if (__item != null && stopTimeDetails != null && !stopTimeDetails.Contains(__item)) { stopTimeDetails.Add(__item); } }
public virtual void SetStopTimeDetailsAt(StopTimeDetails __item, int __index) { if (__item == null) { stopTimeDetails[__index] = null; } else { stopTimeDetails[__index] = __item; } }
public virtual void AddStopTimeDetails(StopTimeDetails __item) { if (__item != null && stopTimeDetails != null && !stopTimeDetails.Contains(__item)) { stopTimeDetails.Add(__item); if (__item.RouteTimeDetails != this) { __item.RouteTimeDetails = this; } } }
public virtual void SetStopTimeDetailsAt(StopTimeDetails __item, int __index) { if (__item == null) { stopTimeDetails[__index].RouteTimeDetails = null; } else { stopTimeDetails[__index] = __item; if (__item.RouteTimeDetails != this) { __item.RouteTimeDetails = this; } } }
/// <summary> /// Returns true if self and the provided entity have the same Id values /// and the Ids are not of the default Id value /// </summary> protected bool HasSameNonDefaultIdAs(StopTimeDetails compareTo) { return(!this.IsTransient() && !compareTo.IsTransient() && this.Id.Equals(compareTo.Id)); }
/// <summary> /// Copies the current object to a new instance /// </summary> /// <param name="deep">Copy members that refer to objects external to this class (not dependent)</param> /// <param name="copiedObjects">Objects that should be reused</param> /// <param name="asNew">Copy the current object as a new one, ready to be persisted, along all its members.</param> /// <param name="reuseNestedObjects">If asNew is true, this flag if set, forces the reuse of all external objects.</param> /// <param name="copy">Optional - An existing [StopTimeDetails] instance to use as the destination.</param> /// <returns>A copy of the object</returns> public virtual StopTimeDetails Copy(bool deep = false, Hashtable copiedObjects = null, bool asNew = false, bool reuseNestedObjects = false, StopTimeDetails copy = null) { if (copiedObjects == null) { copiedObjects = new Hashtable(); } if (copy == null && copiedObjects.Contains(this)) { return((StopTimeDetails)copiedObjects[this]); } copy = copy ?? new StopTimeDetails(); if (!asNew) { copy.TransientId = this.TransientId; copy.Id = this.Id; } copy.ArrivalTime = this.ArrivalTime; copy.DepartureTime = this.DepartureTime; copy.ElapsedTime = this.ElapsedTime; copy.StopSequence = this.StopSequence; copy.PickupType = this.PickupType; copy.DropOffType = this.DropOffType; copy.Timepoint = this.Timepoint; if (!copiedObjects.Contains(this)) { copiedObjects.Add(this, copy); } if (deep && this.routeTimeDetails != null) { if (!copiedObjects.Contains(this.routeTimeDetails)) { if (asNew && reuseNestedObjects) { copy.RouteTimeDetails = this.RouteTimeDetails; } else if (asNew) { copy.RouteTimeDetails = this.RouteTimeDetails.Copy(deep, copiedObjects, true); } else { copy.routeTimeDetails = this.routeTimeDetails.Copy(deep, copiedObjects, false); } } else { if (asNew) { copy.RouteTimeDetails = (RouteTimeDetails)copiedObjects[this.RouteTimeDetails]; } else { copy.routeTimeDetails = (RouteTimeDetails)copiedObjects[this.RouteTimeDetails]; } } } if (deep && this.station != null) { if (!copiedObjects.Contains(this.station)) { if (asNew && reuseNestedObjects) { copy.Station = this.Station; } else if (asNew) { copy.Station = this.Station.Copy(deep, copiedObjects, true); } else { copy.station = this.station.Copy(deep, copiedObjects, false); } } else { if (asNew) { copy.Station = (Station)copiedObjects[this.Station]; } else { copy.station = (Station)copiedObjects[this.Station]; } } } return(copy); }