Public Class EtapaBusinessObject
    Inherits BusinessObject(Of Etapa)

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

    Public Sub New(ByVal entity As Etapa)
        MyBase.New(entity)
        DbHelper = New EtapaDbHelper
    End Sub

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

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

    Public Shared Function GetListEtapaByProcesoEvaluacion(ByVal idProcesoEvaluacion as Int32, Optional ByVal foreignLevel As Integer=0) As EntityList(Of Etapa)
        Return GetDdHelperInstance.GetListEtapaByProcesoEvaluacion(idProcesoEvaluacion, foreignLevel)
    End Function

#End Region
End Class
