Public Class AreaBusinessObject
    Inherits BusinessObject(Of Area)

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

    Public Sub New(ByVal entity As Area)
        MyBase.New(entity)
        DbHelper = New AreaDbHelper
    End Sub

    Public Sub New(ByVal idArea As Int32, Optional ByVal foreignLevel As Integer=0)
        Me.New()
        _Entity.idArea = idArea
        Dim Entity_Aux As Area = 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 AreaBusinessObject
    Protected Shared Function GetDdHelperInstance() As AreaDbHelper
        If _Instance Is Nothing Then
            _Instance = New AreaBusinessObject
        End If
    Return CType(_Instance.DbHelper, AreaDbHelper)
    End Function

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

    Public Shared Function GetListAreaByFactorPuntaje(ByVal idFactorPuntaje as Int32, Optional ByVal foreignLevel As Integer=0) As EntityList(Of Area)
        Return GetDdHelperInstance.GetListAreaByFactorPuntaje(idFactorPuntaje, foreignLevel)
    End Function

#End Region
End Class
