Loading...
 

SetDomain

SetDomain

SetDomain(CX_xxxxx, WRITE), SetDomain(, WRITE)

Parameter: Identifier of a class (can also be on the stack)

Stack
Stack Position Description
Stack(In) Top Bit Pattern
Stack(Out) -

Within a layer, the objects of each class can be further subdivided. The bit-pattern indicates whether CreatePersObject places the just created object into the root EP collection of a domain or not. If the kth bit from the right is 1, the object is included in the kth domain. Default is 1, i.e. the object is put into the Root-EP-Collection of the 1st domain.
The following example shows the connection between layer, domain and bitpattern for Inheritance.

SetDomain(CX_xxxxx, READ), SetDomain(, READ)

Parameter: Identifier of a class (can also be on the stack)

Stack
Stack Position Object type / Description
Stack(In) Top Bitt-Pattern
Stack(Out) -

selects a domain for read access. If objects are reached with FindFirst , FindExists , Find or FindAll, the set k-th domain determines in which RootEP-Collection is searched.
At the moment domains cannot be concatenated! The set read domain also controls the evaluation of access expressions.

// Set the read and write domains for invoices and credit notes to 2

2 SetDomain(CX_INVOICE, READ)
2 SetDomain(CX_INVOICE, WRITE)
2 SetDomain(CX_CREDIT_NOTE, READ)
2 SetDomain(CX_CREDIT_NOTE, WRITE)