Public Class FactorPuntajeBusinessObject
    Inherits BusinessObject(Of FactorPuntaje)

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

    Public Sub New(ByVal entity As FactorPuntaje)
        MyBase.New(entity)
        DbHelper = New FactorPuntajeDbHelper
    End Sub

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

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

    Public Shared Function GetListFactorPuntajeByFactor(ByVal idFactor as Int32, Optional ByVal foreignLevel As Integer=0) As EntityList(Of FactorPuntaje)
        Return GetDdHelperInstance.GetListFactorPuntajeByFactor(idFactor, foreignLevel)
    End Function

    Public Shared Function GetListFactorPuntajeByPlaza(ByVal idPlaza as Int32, Optional ByVal foreignLevel As Integer=0) As EntityList(Of FactorPuntaje)
        Return GetDdHelperInstance.GetListFactorPuntajeByPlaza(idPlaza, foreignLevel)
    End Function

#End Region
End Class
