[This is preliminary documentation and is subject to change.]
C# |
public class Operation : Persistent, IOrderable, IComparable, IMetaReferable
All Members | Methods | Properties | Fields | Events | |
Icon | Member | Description |
---|---|---|
Adopt(Persistent, IReference%, Int32) | This method is intended for use only from generated code, and you
should not use it in open code. (Inherited from Persistent.) | |
Adopted | Occurs when this object is adopted as a contained (not
associated) child object of another object. (Inherited from Persistent.) | |
AnnotationSeparator | This string is used to separate the text in NominativeText and DiscriminativeText properties
(Inherited from Persistent.) | |
Associate(Persistent, IReference%, Int32) | This method is intended for use only from generated code, and you
should not use it in open code. (Inherited from Persistent.) | |
Associated | Occurs when this object is taken as an associated child object
of another object. (Inherited from Persistent.) | |
AssociatorCount()()()() | Gets the number of associations made to this object. (Inherited from Persistent.) | |
BaseClassReference(Persistent, Reference) |
Here only to allow consistent use of new keyword in generated classes.
Always throws an exception.
(Inherited from Persistent.) | |
BuildNames(List<(Of <<'(String>)>>)) | Builds a list of names for use in creating a MetaReference to this object. | |
CallTree(CallTreeData, Int32) | In derived classes, calls a particular delegate for every node in
a persistent tree. (Inherited from Persistent.) | |
CallTree(CallTreeData) | Starts a recursive descent of the persistent containment tree
from this object, calling a delegate for every node in the tree below this
object. (Inherited from Persistent.) | |
Class | Gets the ObjectClass object associated with this object. (Overrides Persistent.Class.) | |
ClassFlags | Gets the class flags for the Operation class. (Overrides Persistent.ClassFlags.) | |
Clone()()()() | Creates a copy of this object. (Inherited from Persistent.) | |
Collection()()()() | Creates a Operation collection to contain provisional objects. | |
Collection(Persistent, FlagSet, Int32, Boolean) | Creates a Operation collection to contain persistent objects. | |
Collective | Whether this operation works only in conjuction with both a
target object and target collection. | |
CompareTo(Object) | Compares this Operation to another. This comparison is
responsible for ordering menus and items within menus and the toolbar.
| |
ContainingEnvironment | Gets the Environment that this object is contained within.
(Inherited from Persistent.) | |
CopyFrom(Persistent) | Copies values of fields from another Persistent of the same type.
(Inherited from Persistent.) | |
CopyTransientFrom(Persistent) | Allows derived classes to copy transient data when CopyFrom is called. (Inherited from Persistent.) | |
Database | Gets the Database object for the database in which
this object is or is to be stored. (Inherited from Persistent.) | |
DeAssociateFrom(Persistent, Int32) | This method is intended for use only from generated code, and you
should not use it in open code. (Inherited from Persistent.) | |
Deleted | This event occurs when an object is deleted. (Inherited from Persistent.) | |
DeleteVolatile(IReference) | This method is intended for use only from generated code, and you
should not use it in open code. (Inherited from Persistent.) | |
DePersist(Object) | This method is intended for use only from generated code, and you
should not use it in open code. (Inherited from Persistent.) | |
DePersistFrom(IPersistateList, Object) | This method is intended for use only from generated code, and you
should not use it in open code. (Inherited from Persistent.) | |
DeReference(Persistent) | Returns this object. (Inherited from Persistent.) | |
DeReferenceSection(String) | Dereferences a section in a MetaReference. Always
throws an exception. | |
DiscriminativeText | Gets a string containing values of discriminative properties. (Overrides Persistent.DiscriminativeText.) | |
Disowned | Occurs when this object is disowned from being a contained (not
associated) child object of another object. (Inherited from Persistent.) | |
Dissociated | Occurs when this object is removed from being an associated child
object of another object. (Inherited from Persistent.) | |
Equals(Persistent) | Determines if this Persistent is equal to another. (Inherited from Persistent.) | |
Equals(Object) | (Inherited from Object.) | |
Execute(Persistent, IPersistateList, array<Object>[]()[][]) | Executes the operation in the active Session and
returns an ExecutionResult. | |
Execute(ExecutionResultHandler, Persistent, IPersistateList, array<Object>[]()[][]) | Executes the operation in the active Session,
passing the result to an ExecutionResultHandler. | |
ExecuteConcurrent(ExecutionResultHandler, Persistent, IPersistateList, array<Object>[]()[][]) | Executes the operation in the active Session on a
thread pool thread. | |
ExecutesInUi | Indicates whether this Operation executes in a user interface
Module. | |
FillFromDatabase(Database, IDataReader) | This method is intended for use only from generated code, and
you should not use it in open code. (Inherited from Persistent.) | |
FillFromMessage(Message) | This method is intended for use only from generated code, and you
should not use it in open code. (Inherited from Persistent.) | |
Finalize()()()() |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) | |
FindOperation(String) | Finds the Operation with a particular fully qualified name.
| |
FriendlyName | The friendly or display name of this Operation as defined in the
Persistate definition file. | |
FriendlyNameKey | Key value for friendly name index. | |
FullyQualifiedName | Gets the fully qualified name of this Operation. | |
GetAssociators()()()() | Gets a collection of all objects which have associations to this
object. (Inherited from Persistent.) | |
GetChildren<(Of <<'(T>)>>)(IndexedList<(Of <<'(T>)>>), ObjectClass, FlagSet, Int32, String, array<Object>[]()[][]) | This method is intended for use only from generated code, and you
should not use it in open code. (Inherited from Persistent.) | |
GetChildren<(Of <<'(T>)>>)(IndexedList<(Of <<'(T>)>>), ObjectClass, String, array<Object>[]()[][]) | This method is intended for use only from generated code, and you
should not use it in open code. (Inherited from Persistent.) | |
GetDefaultLayout()()()() |
Finds the default layout for this object. This will always be
of layout type Form.
(Inherited from Persistent.) | |
GetFieldValue(Int32) | Gets the value of the field backing the member with a particular slot number. (Overrides Persistent.GetFieldValue(Int32).) | |
GetHashCode()()()() |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
GetKey(Int32) | Returns property value for given key number. (Overrides Persistent.GetKey(Int32).) | |
GetMemberValue(Int32) | Gets the value of the member property with a particular slot number. (Overrides Persistent.GetMemberValue(Int32).) | |
GetSelected<(Of <<'(T>)>>)(IndexedList<(Of <<'(T>)>>), ObjectClass, array<Object>[]()[][]) | This method is intended for use only from generated code, and you
should not use it in open code. (Inherited from Persistent.) | |
GetType()()()() |
Gets the Type of the current instance.
(Inherited from Object.) | |
InitialiseMembers(Boolean, Boolean) | In derived classes, initialises members of the Persistent object.
(Inherited from Persistent.) | |
IsAttached | Determines whether this object is attached to the persistent
tree. (Inherited from Persistent.) | |
IsDistributedFrom(Persistent) | Determines whether this object is held or is to be held in a
different Database than another object. (Inherited from Persistent.) | |
IsEmpty | Determines whether this is the Empty object of its class, as
returned by the EmptyObject
property. (Inherited from Persistent.) | |
IsForeign | Gets a value determining whether this object is originally from a
Domain other than the local Domain. (Inherited from Persistent.) | |
IsInvalid | Gets a value indicating the validity of the current state of this
object. (Inherited from Persistent.) | |
IsModified | Gets a value indicating whether this object has been modified
(Inherited from Persistent.) | |
IsPersisted | Gets a value indicating whether the object has been persisted
in a Database.
(Inherited from Persistent.) | |
IsProvisional | Gets a value indicating whether this object is still provisional
- has not been persisted in a Database. (Inherited from Persistent.) | |
IsSingletonOperation()()()() | Determines whether this operation's target class is a singleton
class. | |
IsVisibleIn(OperationVisibility) | Determines whether this operation should be visible in a
particular OperationVisibility. | |
ItsObjectClass | Gets the ObjectClass object associated with this class. | |
locker |
This object is used to synchronise fetches of contained objects and collections
in generated code.
(Inherited from Persistent.) | |
Login | Gets the operation Login from the set of standard
operations of the Persistent class | |
MemberwiseClone()()()() |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
Modified | Occurs when an object is modified. (Inherited from Persistent.) | |
Move(String, Persistent, String) | Moves this object from its current parent object to a new one.
(Inherited from Persistent.) | |
Move(String, Persistent, String, Int32) | Moves this object from its current parent object to a new one,
optionally inserting it at a particular position in a collection.
(Inherited from Persistent.) | |
Name | The name of this operation used in the names of the method stubs
created for this operation. | |
NameKey | Key value for name index. | |
NominativeText | Gets a string containing values of nominative properties. (Overrides Persistent.NominativeText.) | |
ObjectNumber | This returns the object number part of the object's Reference.
(Inherited from Persistent.) | |
OnModified()()()() | Raises events signalling that the current object has been
modified. (Inherited from Persistent.) | |
OperationVisibility | The elements of a user interface where this Operation should be
visible, such as in menus, toolbars or context menus. | |
Order | The order of this Operation in its OperationGroup.Operations
collection. | |
OwningDomain |
Gets the Domain to which this object originally belongs.
(Inherited from Persistent.) | |
Parent | This returns the parent object of this one. (Inherited from Persistent.) | |
ParentOperationGroup | Gets the Parent object as a OperationGroup. | |
ParentReference | Gets a Reference to this object's parent object.
(Inherited from Persistent.) | |
Presence(Session, Persistent, IPersistateList) | Calls the Presence method for the Operation to determine whether
the operation should be visible and/or enabled at this time. | |
PreviousVersion | Returns the previous version of this object. (Inherited from Persistent.) | |
Refresh()()()() | Gets the current value of this object from persistent storage.
(Inherited from Persistent.) | |
RefreshAndLock()()()() | Gets the current value of this object from persistent storage and
sets a database lock. (Inherited from Persistent.) | |
RefreshTree()()()() | Refreshes the entire persistent containment tree under this
object. (Inherited from Persistent.) | |
RestoreUnmodified(Boolean) | Restores the values of an object's members to those of the
previous version. (Inherited from Persistent.) | |
SaveToDatabase(Database, Reference, Object) | This method is intended for use only from generated code, and you
should not use it in open code. (Inherited from Persistent.) | |
SaveToMessage(Message) | Saves this Persistent object to a Message.
(Inherited from Persistent.) | |
SaveToMessage(Message, Boolean) | Saves this Persistent object to a Message.
(Inherited from Persistent.) | |
SetFieldValue(Int32, Object) | Sets the value of the field backing the member with a particular slot number. (Overrides Persistent.SetFieldValue(Int32, Object).) | |
SetMemberFromMessage(Int32, Int32, Message) | This method is intended for use only from generated code, and you
should not use it in open code. (Inherited from Persistent.) | |
SetMemberValue(Int32, Object) | Sets the value of the member property with a particularn slot number. (Overrides Persistent.SetMemberValue(Int32, Object).) | |
SetModified()()()() | Signals to Persistate that an object has been modified. (Inherited from Persistent.) | |
SetModifiedSynced()()()() | Signals to Persistate that an object has been modified. The call
is protected by a lock on this object. (Inherited from Persistent.) | |
ShortcutKey | A value which determines a shortcut key which will request the
execution of this Operation. | |
ShortcutKeys | Gets or sets the ShortcutKey property as a ShortcutKeys
value. | |
Show | Gets the operation Show from the set of standard
operations of the Persistent class | |
SingletonTarget(Session) | Finds the singleton object which this operation is performed on
if its target class is a singleton class. | |
StandardOperation | Whether this is one of the standard operations defined in the
Persistate runtime. | |
StoreInDatabase(Database) | Marks this object so that it will be stored in a particular Database. (Inherited from Persistent.) | |
ThisObj | This property is used in binding combo box selected values. It
returns the current object. (Inherited from Persistent.) | |
TitleText | Gets a title for this object. (Inherited from Persistent.) | |
ToMetaReference()()()() | Creates a MetaReference referring to this object,
if possible. (Inherited from Persistent.) | |
ToMetaReference(Boolean) | Creates an environment relative MetaReference
referring to this object, if possible. (Inherited from Persistent.) | |
ToReference()()()() | Obtains a Reference to this Object. (Inherited from Persistent.) | |
ToString()()()() | Obtains a string describing the object. (Inherited from Persistent.) | |
Traverse(String) | Traverses the persistent object graph from this object using a
period delimited navigation path. (Inherited from Persistent.) | |
Validate()()()() |
Allows inheritors to create a validation method for Persistent classes.
(Inherited from Persistent.) | |
VersionNumber | Gets the version number of this object. (Inherited from Persistent.) | |
WriteTestAssociations(IClassified, Int32, CreateTestDataParameterSet) | Creates test association(s) for an associated member of this
object. (Inherited from Persistent.) | |
WriteTestData(Persistent, Int32, CreateTestDataParameterSet) | Fills this object with test data. (Inherited from Persistent.) |
You define Operations in a Persistate definition file. They are grouped into OperationGroups which are Members of ObjectClasses. The OperationGroups are used to represent groupings of operations in a user interface, such as menus and toolbars. The OperationVisibility property of an Operation defines where in the user interface an Operation will appear.
Note that the way that Operations and OperationGroups function as described here is provisional. They will be redesigned at the same time that the Persistate security subsystem is finalised.
Operations are declarative - they represent a static description of a function. The execution of an Operation at a particular point in time is represented by an Execution object. Operation executions are part of the Persistate scheme to decouple controller code from user interface code, as part of the implementation of the MVC architecture. Controller to user interface communication is performed through the UserInterface class, and user interface to controller communication uses Operation executions.
Operation executions are also the most often used quantum of database transactions. In general, a user will request an Operation execution by selecting a menu option, clicking a toolbar button, or making some other user interface gesture. This request is ferried to the Controller, which then executes the Operation, and at the end of the execution, saves any modifications to persistent storage under control of a transaction.
For every Operation that you define in your Persistate definition file, Persistate will create two method stubs for you. One, called Execute[operation name], will be to execute the Operation, and the other, called [operation name]Presence will be to determine if the Operation should be enabled and/or visible, given the current state of the user interface. These operation stubs are created in classes with the name [operation group name]Operations, and you write the code to set the presence and execute the Operations in these methods.
The Presence method is created in the user interface module. The Execute method is created in the controller module, except for operations you define as user interface Operations. These are Operations which work solely within the user interface, modifying no data, and their Execute methods are created in the user interface module. For these Operations, the ExecutesInUi property returns true.
As well as requesting operation executions by user interaction, you can also execute them programmatically from either the user interface or controller modules. Executing them is exactly the same from both modules - Persistate handles the ferrying of calls to the controller if required. There are two Execute methods to do this, as well as an ExecuteConcurrent method which performs the execution on a threadpool thread.
When you call these methods you supply a target Persistent and a targetCollection IPersistateList parameter, as well as any other parameters that the Operation requires. When Operations are requested from a user interaction, these are the object currently selected on screen, and any collection in which it appears. Either of these can be null, and often your Presence method for the Operation will return Enabled only if there is a target and/or collection of the appropriate type available.
Persistate defines a number of Standard Operations, which are in fact defined in OperationGroups belonging to the Persistent class. For example, the Collection OperationGroup contains the Operations Delete, Remove, New, Add, MoveUp and MoveDown. Executing these operations are the only way you can modify collections in the user interface module. You can, however, modify persistent object properties in code. This starts a Modify operation which is sent to the controller either when you execute Save, or just before you execute any other Operation. Persistate creates Execute and Presence methods for the standard operations too, giving you the chance to alter their behaviour, or stick with the standard operation behaviour.
Object | ||
Persistent | ||
Operation |