//------------------------------------------------------------------------------
//
// 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("SITES")]
public abstract class SiteBase : ObservableEntity
{
public event EventHandler NameChanged;
public event EventHandler DescriptionChanged;
public event EventHandler OrganizationChanged;
public event EventHandler> SitesCatalogsChanged;
public event EventHandler> SitesRmlsChanged;
public event EventHandler> SitesSpoolTypesChanged;
protected String _organizationguid;
///
/// Gets or sets the sitebase organization guid.
///
[Column("ORGANIZATION_GUID")]
[ForeignKey("Organization")]
public String OrganizationGuid
{
get
{
return _organizationguid;
}
set
{
if (_organizationguid != value)
{
_organizationguid = value;
}
}
}
protected String _name;
///
/// Gets or sets the sitebase name.
///
[Column("NAME")]
public String Name
{
get
{
return _name;
}
set
{
if (_name != value)
{
_name = value;
OnNameChanged(value);
}
}
}
protected String _description;
///
/// Gets or sets the sitebase description.
///
[Column("DESCRIPTION")]
public String Description
{
get
{
return _description;
}
set
{
if (_description != value)
{
_description = value;
OnDescriptionChanged(value);
}
}
}
protected Organization _organization;
///
/// Gets or sets the sitebase organization.
///
[XmlIgnore]
[JsonIgnore]
public virtual Organization Organization
{
get
{
return _organization;
}
set
{
if (_organization != value)
{
_organization = value;
if (Organization != null)
{
OrganizationGuid = Organization.Guid;
}
OnOrganizationChanged(value);
}
}
}
protected SynchronizedObservableCollection _sitescatalogs;
///
/// Gets or sets the sitebase sites catalogs.
///
public virtual SynchronizedObservableCollection SitesCatalogs
{
get
{
return _sitescatalogs;
}
set
{
if (_sitescatalogs != value)
{
_sitescatalogs = value;
OnSitesCatalogsChanged(value);
}
}
}
protected SynchronizedObservableCollection _sitesrmls;
///
/// Gets or sets the sitebase sites rmls.
///
public virtual SynchronizedObservableCollection SitesRmls
{
get
{
return _sitesrmls;
}
set
{
if (_sitesrmls != value)
{
_sitesrmls = value;
OnSitesRmlsChanged(value);
}
}
}
protected SynchronizedObservableCollection _sitesspooltypes;
///
/// Gets or sets the sitebase sites spool types.
///
public virtual SynchronizedObservableCollection SitesSpoolTypes
{
get
{
return _sitesspooltypes;
}
set
{
if (_sitesspooltypes != value)
{
_sitesspooltypes = value;
OnSitesSpoolTypesChanged(value);
}
}
}
///
/// Called when the Name has changed.
///
protected virtual void OnNameChanged(String name)
{
NameChanged?.Invoke(this, name);
RaisePropertyChanged(nameof(Name));
}
///
/// Called when the Description has changed.
///
protected virtual void OnDescriptionChanged(String description)
{
DescriptionChanged?.Invoke(this, description);
RaisePropertyChanged(nameof(Description));
}
///
/// Called when the Organization has changed.
///
protected virtual void OnOrganizationChanged(Organization organization)
{
OrganizationChanged?.Invoke(this, organization);
RaisePropertyChanged(nameof(Organization));
}
///
/// Called when the SitesCatalogs has changed.
///
protected virtual void OnSitesCatalogsChanged(SynchronizedObservableCollection sitescatalogs)
{
SitesCatalogsChanged?.Invoke(this, sitescatalogs);
RaisePropertyChanged(nameof(SitesCatalogs));
}
///
/// Called when the SitesRmls has changed.
///
protected virtual void OnSitesRmlsChanged(SynchronizedObservableCollection sitesrmls)
{
SitesRmlsChanged?.Invoke(this, sitesrmls);
RaisePropertyChanged(nameof(SitesRmls));
}
///
/// Called when the SitesSpoolTypes has changed.
///
protected virtual void OnSitesSpoolTypesChanged(SynchronizedObservableCollection sitesspooltypes)
{
SitesSpoolTypesChanged?.Invoke(this, sitesspooltypes);
RaisePropertyChanged(nameof(SitesSpoolTypes));
}
///
/// Initializes a new instance of the class.
///
public SiteBase() : base()
{
SitesCatalogs = new SynchronizedObservableCollection();
SitesRmls = new SynchronizedObservableCollection();
SitesSpoolTypes = new SynchronizedObservableCollection();
}
}
}