Home > Class Reference > %SYS namespace > %Compiler.Type.Relationship


class %Compiler.Type.Relationship extends %Compiler.Type.Object

Object Relationship Property Class

Method Inventory (Including Private)


ACCESSPOLICY defines how collection is fetched to the client application. EAGER: The whole collection is fetched no later than it is first accessed by application in any manner. If collection contains object values then objects are opened and instantiated in application memory. For applications using POJO mode this means that application can use this collection even if it has been disconnected from the server afterwards. Value EAGER is a requirement, meaning that if it is specified then EAGER policy always be employed. LAZY: Values in collection can be fetched as they are requested by the application, e.g. when methods get() or Iterator.next() are invoked. Value LAZY is a hint meaning that if it is specified it tells that LAZY policy may be used for this collection but does not guarantee that it is used. In case LAZY fetching is used collection may become invalid when application disconnected from the server.

Methods (Including Private)

method GetSwizzled(noswizzle As %Library.Boolean = 0) as %RegisteredObject [ Language = objectscript ]
Return the oref of the object referenced by this property. If the oref isn't present then swizzle the OID to produce one and relate the objects.
method NewObject() as %ObjectHandle [ Language = objectscript ]
Creates a new instance of this property's type class and returns its reference to the caller.
classmethod OnDelete(id As %RawString = "", concurrency As %Integer = -1) as %Status [ Language = objectscript ]
classmethod RClose(%qHandle As %Binary) as %Status [ Language = objectscript ]
Close the query that returns a list of related objects.
classmethod RExec(ByRef %qHandle As %Binary, inverse As %String) as %Status [ Language = objectscript ]
Instantiate a query that returns a list of objects related to inverse.
classmethod RFetch(ByRef %qHandle As %Binary, FetchCount As %Integer = 0, ByRef RowSet As %List, ByRef ReturnCount As %Integer, ByRef AtEnd As %Integer) as %Status [ Language = objectscript ]
Returns up to FetchCount number of rows (or up to 32k of data if FetchCount is zero) in RowSet. ReturnCount indicates the number of rows returned. AtEnd is TRUE if the query encountered an end-of-data condition while retrieving data - in other words, don't try calling again.
method Relate(oref) as %Status [ Language = objectscript ]
Connect two objects in memory so that the relationship in each object has a swizzled reference to its inverse relationship in the other object.
method Set(newvalue As %String) as %Status [ Language = objectscript ]
Set the value of this property to newvalue. If this property has a current value that that is not newvalue then %Close it, decrement its reference count and UnRelate() it. Relate() the new value.
method SetObject(newvalue As %ObjectIdentity) as %Status [ Language = objectscript ]
This method stores a new value for the OID of the referenced object. if swizzling has not occurred, it simply stores the OID (after perhaps stripping the class name if CLASSNAME=0). If swizzling has occurred, then it references the object to obtain its OID. If it is the same, then nothing happens. If they are different then the old object is closed and the new OID is stored.
method SetObjectId(newid As %String) as %Status [ Language = objectscript ]
This method stores simply calls SetObject() with constructed Oid |
method UnRelate(oref) as %Status [ Language = objectscript ]
Terminate the relationship between two objects. For multi-valued relationships just invoke its UnRelate() method.
private method UnSwizzle(force As %Integer = 0) as %Status [ Language = objectscript ]
Unswizzles a property, if it has an oref |

Inherited Members

Inherited Methods (Including Private)