Public Class USU_EspecialidadBusinessObject
    Inherits BusinessObject(Of USU_Especialidad)

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

    Public Sub New(ByVal entity As USU_Especialidad)
        MyBase.New(entity)
        DbHelper = New USU_EspecialidadDbHelper
    End Sub

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

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

    Public Shared Function GetListUSU_EspecialidadBySEG_Usuarios(ByVal idUsuario As Int32, Optional ByVal foreignLevel As Integer = 0) As EntityList(Of USU_Especialidad)
        Return GetDdHelperInstance.GetListUSU_EspecialidadBySEG_Usuarios(idUsuario, foreignLevel)
    End Function

#End Region
End Class

