Public Class HistorialEstadoPlazaBusinessObject
    Inherits BusinessObject(Of HistorialEstadoPlaza)

#Region "Contructores"
    Public Sub New()
        MyBase.New()
        DbHelper = New HistorialEstadoPlazaDbHelper
    End Sub

    Public Sub New(ByVal entity As HistorialEstadoPlaza)
        MyBase.New(entity)
        DbHelper = New HistorialEstadoPlazaDbHelper
    End Sub

    Public Sub New(ByVal idHistorialEstadoPlaza As Int32, Optional ByVal foreignLevel As Integer=0)
        Me.New()
        _Entity.idHistorialEstadoPlaza = idHistorialEstadoPlaza
        Dim Entity_Aux As HistorialEstadoPlaza = DbHelper.SelectEntity(_Entity,foreignLevel)
        If Not Entity_Aux Is Nothing Then
            _IsNew = False
            _Entity = Entity_Aux
        End If
    End Sub
#End Region

#Region "Metodos Estaticos"
    Protected Shared _Instance As HistorialEstadoPlazaBusinessObject
    Protected Shared Function GetDdHelperInstance() As HistorialEstadoPlazaDbHelper
        If _Instance Is Nothing Then
            _Instance = New HistorialEstadoPlazaBusinessObject
        End If
    Return CType(_Instance.DbHelper, HistorialEstadoPlazaDbHelper)
    End Function

    Public Shared Function GetListHistorialEstadoPlaza(Optional ByVal foreignLevel As Integer=0) As EntityList(Of HistorialEstadoPlaza)
        Return GetDdHelperInstance.SelectList(foreignLevel)
    End Function

    Public Shared Function GetListHistorialEstadoPlazaByEstadoPlaza(ByVal idEstado as Int32, Optional ByVal foreignLevel As Integer=0) As EntityList(Of HistorialEstadoPlaza)
        Return GetDdHelperInstance.GetListHistorialEstadoPlazaByEstadoPlaza(idEstado, foreignLevel)
    End Function

    Public Shared Function GetListHistorialEstadoPlazaByPlaza(ByVal idPlaza as Int32, Optional ByVal foreignLevel As Integer=0) As EntityList(Of HistorialEstadoPlaza)
        Return GetDdHelperInstance.GetListHistorialEstadoPlazaByPlaza(idPlaza, foreignLevel)
    End Function

#End Region
End Class
