The Strix Object Persistence Engine
by Cesar A. Gonzalez Perez

Listing One
system Test {Verdewek/Test}
enum EProjectType
 InformationSystem
 Component:
  COMServer
  ActiveXControl
  .
 WebSite
end
class Person abstract
 attribute Name: 1 String 40
 attribute Address: String 200
end
class Customer
 isa Person
 attribute Code: 1 String 8
 reference Requests: 1..n Project inverse RequestedBy bound
end
class Employee
 isa Person
 attribute Wage: Fixed
 attribute Job: String 40
 reference WorksIn: Project inverse HasTeam main
end
class Project
  attribute Name: 1 String 40
 attribute Type: 1..n EProjectType
 attribute DateDue: TimeStamp
 attribute Finished: Boolean
 reference RequestedBy: 1 [Requester] Customer inverse
Requests main
 reference HasTeam: [TeamMembers] Employee inverse WorksIn
 invariant FinishedInPast: Finished Or (Finished And DateDue
< Now())
end

Listing Two
'retrieve target customer.
Dim obCustomer As GiObject
[retrieve it in any way you choose]

'prepare collection to hold projects for the customer.
Dim obsProjects As GiObjectCol
Set obsProjects =
obCustomer.Package.CreateObjectCol("Project")
Dim obProject As GiObject

'iterate tuples of target customer.
Dim tu As GiTuple
For Each tu In obCustomer.Tuples
 'if tuple belongs to the Requests reference...
 If tu.Reference.Name = "Requests" Then
  'retrieve related project.
  Set obProject = sy.RetrieveObject(tu.TargetOId)
  'and add it to the collection.
  obsProjects.Add obProject
 End If
Next tu

Listing Three
'retrieve target customer.
Dim cus As Customer
[retrieve it in any way you choose]

'prepare collection to hold projects for the customer.
Dim pjs As Projects

'retrieve project list.
Set pjs = cus.Requests




7


