Imports System
Imports System.ComponentModel

Imports DevExpress.Xpo
Imports DevExpress.Data.Filtering

Imports DevExpress.ExpressApp
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation

<DefaultClassOptions(), NavigationItem(False), CreatableItem(False), DeferredDeletion(False)> _
Public Class LockingObject
    Inherits BaseObject

    Private _TableName As String
    Private _User As User
    Private _ObjectType As Type
    Private _ObjectKey As String
    Private _ObjectCreated As Date
    Private _SessionCreated As String
    Public Sub New(ByVal session As Session)
        MyBase.New(session)
        ' This constructor is used when an object is loaded from a persistent storage.
        ' Do not place any code here or place it only when the IsLoading property is false:
        ' if (!IsLoading){
        '   It is now OK to place your initialization code here.
        ' }
        ' or as an alternative, move your initialization code into the AfterConstruction method.
    End Sub
    Public Overrides Sub AfterConstruction()
        MyBase.AfterConstruction()
        ' Place here your initialization code.
    End Sub

    <Size(255), Indexed(Unique:=True)> _
    Property TableName As String
        Get
            Return _TableName
        End Get
        Set(value As String)
            SetPropertyValue("TableName", _TableName, value)
        End Set
    End Property

    Property User As User
        Get
            Return _User
        End Get
        Set(value As User)
            SetPropertyValue("User", _User, value)
        End Set
    End Property
    Property ObjectType As Type
        Get
            Return _ObjectType
        End Get
        Set(value As Type)
            SetPropertyValue("ObjectType", _ObjectType, value)
        End Set
    End Property
    Property ObjectKey As String
        Get
            Return _ObjectKey
        End Get
        Set(value As String)
            SetPropertyValue("ObjectKey", _ObjectKey, value)
        End Set
    End Property
    Property ObjectCreated As Date
        Get
            Return _ObjectCreated
        End Get
        Set(value As Date)
            SetPropertyValue("ObjectCreated", _ObjectCreated, value)
        End Set
    End Property
    <Size(-1)> _
    Property SessionCreated As String
        Get
            Return _SessionCreated
        End Get
        Set(value As String)
            SetPropertyValue("SessionCreated", _SessionCreated, value)
        End Set
    End Property
End Class
