Public Class USU_ReferenciasBusinessObject
    Inherits BusinessObject(Of USU_Referencias)

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

    Public Sub New(ByVal entity As USU_Referencias)
        MyBase.New(entity)
        DbHelper = New USU_ReferenciasDbHelper
    End Sub

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

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

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

#End Region
End Class
