//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Tango Observables Generator
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. Do not modify!
//
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Xml.Serialization;
using Newtonsoft.Json;
using System.Linq;
using Tango.DAL.Remote.DB;
using Tango.Core;
using System.ComponentModel;
using Tango.Core.CustomAttributes;
namespace Tango.BL.Entities
{
[Table("SPOOLS")]
public abstract class SpoolBase : ObservableEntity
{
public event EventHandler> StartOffsetPulsesChanged;
public event EventHandler> BackingRateChanged;
public event EventHandler> SegmentOffsetPulsesChanged;
public event EventHandler> BottomBackingRateChanged;
public event EventHandler> LimitSwitchStartPointOffsetChanged;
public event EventHandler MachineChanged;
public event EventHandler SpoolTypeChanged;
protected String _spooltypeguid;
///
/// Gets or sets the spoolbase spool type guid.
///
[Column("SPOOL_TYPE_GUID")]
[ForeignKey("SpoolType")]
public String SpoolTypeGuid
{
get
{
return _spooltypeguid;
}
set
{
if (_spooltypeguid != value)
{
_spooltypeguid = value;
}
}
}
protected String _machineguid;
///
/// Gets or sets the spoolbase machine guid.
///
[Column("MACHINE_GUID")]
[ForeignKey("Machine")]
public String MachineGuid
{
get
{
return _machineguid;
}
set
{
if (_machineguid != value)
{
_machineguid = value;
}
}
}
protected Nullable _startoffsetpulses;
///
/// Gets or sets the spoolbase start offset pulses.
///
[Column("START_OFFSET_PULSES")]
public Nullable StartOffsetPulses
{
get
{
return _startoffsetpulses;
}
set
{
if (_startoffsetpulses != value)
{
_startoffsetpulses = value;
OnStartOffsetPulsesChanged(value);
}
}
}
protected Nullable _backingrate;
///
/// Gets or sets the spoolbase backing rate.
///
[Column("BACKING_RATE")]
public Nullable BackingRate
{
get
{
return _backingrate;
}
set
{
if (_backingrate != value)
{
_backingrate = value;
OnBackingRateChanged(value);
}
}
}
protected Nullable _segmentoffsetpulses;
///
/// Gets or sets the spoolbase segment offset pulses.
///
[Column("SEGMENT_OFFSET_PULSES")]
public Nullable SegmentOffsetPulses
{
get
{
return _segmentoffsetpulses;
}
set
{
if (_segmentoffsetpulses != value)
{
_segmentoffsetpulses = value;
OnSegmentOffsetPulsesChanged(value);
}
}
}
protected Nullable _bottombackingrate;
///
/// Gets or sets the spoolbase bottom backing rate.
///
[Column("BOTTOM_BACKING_RATE")]
public Nullable BottomBackingRate
{
get
{
return _bottombackingrate;
}
set
{
if (_bottombackingrate != value)
{
_bottombackingrate = value;
OnBottomBackingRateChanged(value);
}
}
}
protected Nullable _limitswitchstartpointoffset;
///
/// Gets or sets the spoolbase limit switch start point offset.
///
[Column("LIMIT_SWITCH_START_POINT_OFFSET")]
public Nullable LimitSwitchStartPointOffset
{
get
{
return _limitswitchstartpointoffset;
}
set
{
if (_limitswitchstartpointoffset != value)
{
_limitswitchstartpointoffset = value;
OnLimitSwitchStartPointOffsetChanged(value);
}
}
}
protected Machine _machine;
///
/// Gets or sets the spoolbase machine.
///
[XmlIgnore]
[JsonIgnore]
public virtual Machine Machine
{
get
{
return _machine;
}
set
{
if (_machine != value)
{
_machine = value;
if (Machine != null)
{
MachineGuid = Machine.Guid;
}
OnMachineChanged(value);
}
}
}
protected SpoolType _spooltype;
///
/// Gets or sets the spoolbase spool types.
///
[XmlIgnore]
[JsonIgnore]
public virtual SpoolType SpoolType
{
get
{
return _spooltype;
}
set
{
if (_spooltype != value)
{
_spooltype = value;
if (SpoolType != null)
{
SpoolTypeGuid = SpoolType.Guid;
}
OnSpoolTypeChanged(value);
}
}
}
///
/// Called when the StartOffsetPulses has changed.
///
protected virtual void OnStartOffsetPulsesChanged(Nullable startoffsetpulses)
{
StartOffsetPulsesChanged?.Invoke(this, startoffsetpulses);
RaisePropertyChanged(nameof(StartOffsetPulses));
}
///
/// Called when the BackingRate has changed.
///
protected virtual void OnBackingRateChanged(Nullable backingrate)
{
BackingRateChanged?.Invoke(this, backingrate);
RaisePropertyChanged(nameof(BackingRate));
}
///
/// Called when the SegmentOffsetPulses has changed.
///
protected virtual void OnSegmentOffsetPulsesChanged(Nullable segmentoffsetpulses)
{
SegmentOffsetPulsesChanged?.Invoke(this, segmentoffsetpulses);
RaisePropertyChanged(nameof(SegmentOffsetPulses));
}
///
/// Called when the BottomBackingRate has changed.
///
protected virtual void OnBottomBackingRateChanged(Nullable bottombackingrate)
{
BottomBackingRateChanged?.Invoke(this, bottombackingrate);
RaisePropertyChanged(nameof(BottomBackingRate));
}
///
/// Called when the LimitSwitchStartPointOffset has changed.
///
protected virtual void OnLimitSwitchStartPointOffsetChanged(Nullable limitswitchstartpointoffset)
{
LimitSwitchStartPointOffsetChanged?.Invoke(this, limitswitchstartpointoffset);
RaisePropertyChanged(nameof(LimitSwitchStartPointOffset));
}
///
/// Called when the Machine has changed.
///
protected virtual void OnMachineChanged(Machine machine)
{
MachineChanged?.Invoke(this, machine);
RaisePropertyChanged(nameof(Machine));
}
///
/// Called when the SpoolType has changed.
///
protected virtual void OnSpoolTypeChanged(SpoolType spooltype)
{
SpoolTypeChanged?.Invoke(this, spooltype);
RaisePropertyChanged(nameof(SpoolType));
}
///
/// Initializes a new instance of the class.
///
public SpoolBase() : base()
{
}
}
}