Public Class ConvocatoriaBusinessObject
    Inherits BusinessObject(Of Convocatoria)

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

    Public Sub New(ByVal entity As Convocatoria)
        MyBase.New(entity)
        DbHelper = New ConvocatoriaDbHelper
    End Sub

    Public Sub New(ByVal idConvocatoria As String, Optional ByVal foreignLevel As Integer=0)
        Me.New()
        _Entity.idConvocatoria = idConvocatoria
        Dim Entity_Aux As Convocatoria = 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 ConvocatoriaBusinessObject
    Protected Shared Function GetDdHelperInstance() As ConvocatoriaDbHelper
        If _Instance Is Nothing Then
            _Instance = New ConvocatoriaBusinessObject
        End If
    Return CType(_Instance.DbHelper, ConvocatoriaDbHelper)
    End Function

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

#End Region
End Class
