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("FinancialStock")> _
Public Class UniqueObjects
    Inherits HCategory

    Private _Cars As Cars
    Private _Phones As Phones
    Private _HRPerson As HRPerson

    Public Sub New(ByVal session As Session)
        MyBase.New(session)
    End Sub

    <Browsable(False)> _
    Property Cars As Cars
        Get
            Return _Cars
        End Get
        Set(value As Cars)
            SetPropertyValue("Cars", _Cars, value)
        End Set
    End Property
    <Browsable(False)> _
    Property Phones As Phones
        Get
            Return _Phones
        End Get
        Set(value As Phones)
            SetPropertyValue("Phones", _Phones, value)
        End Set
    End Property
    <Browsable(False)> _
    Property HRPerson As HRPerson
        Get
            Return _HRPerson
        End Get
        Set(value As HRPerson)
            SetPropertyValue("HRPerson", _HRPerson, value)
        End Set
    End Property

    <NonPersistent>
    <ImmediatePostData(True), DataSourceProperty("CollectionOfUniqueObjects")>
    Property ParentObject As UniqueObjects
        Get
            Return MyBase.Parent
        End Get
        Set(value As UniqueObjects)
            MyBase.Parent = value
        End Set
    End Property
    <VisibleInListView(False), VisibleInDetailView(False), VisibleInLookupListView(False)> _
    <Browsable(False)> _
    <NonPersistent()> _
    Private ReadOnly Property CollectionOfUniqueObjects As XPCollection(Of UniqueObjects)
        Get
            Dim _CollectionOfUniqueObjects As New XPCollection(Of UniqueObjects)(Session, CriteriaOperator.Parse("Oid != ?", Me.Oid))
            Return _CollectionOfUniqueObjects
        End Get
    End Property
End Class 'Egyedi azonosítók

