Persistate API documentation
Layout Class
NamespacesPersistateLayout

[This is preliminary documentation and is subject to change.]

Represents an on-screen Layout for a particular class.
Declaration Syntax
C#
public class Layout : Persistent
Members
All MembersMethodsPropertiesFieldsEvents



IconMemberDescription
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.)
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 Layout class.
(Overrides Persistent.ClassFlags.)
Clone()()()()
Creates a copy of this object.
(Inherited from Persistent.)
Collection()()()()
Creates a Layout collection to contain provisional objects.

Collection(Persistent, FlagSet, Int32, Boolean)
Creates a Layout collection to contain persistent objects.

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.)
DefaultForType
Indicates whether this Layout should be used if none has been specified when an object or collection is displayed in a user interface.

DefaultHeight
The default height of the layout in pixels.

DefaultWidth
The default width of the layout in pixels.

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.)
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.)
DiverseLookup
This Layout can be used to show a lookup form for diverse many collections.

Equals(Persistent)
Determines if this Persistent is equal to another.
(Inherited from Persistent.)
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
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.)
FriendlyName
The friendly or display name of the Layout.

FriendlyNameKey
Key value for friendly name index.

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.)
ItsObjectClass
Gets the ObjectClass object associated with this class.

LayoutStyle
The LayoutStyle to use to dislpay this Layout.

LayoutType
The type of this Layout - form, grid, etc..

locker
This object is used to synchronise fetches of contained objects and collections in generated code.
(Inherited from Persistent.)
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 the Layout is derived from the friendly name and is used to name the generate classes which implement it.

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.)
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.)
ParentObjectClass
Gets the Parent object as a ObjectClass.

ParentReference
Gets a Reference to this object's parent object.
(Inherited from Persistent.)
Placements
The set of Placements in this Layout.

PlacementsCount
Gets the number of items in the Placements collection.

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.)
StatusStrip
This Layout can be used to display a Persistate status strip.

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.)
UseForNew
Indicates whether this Layout should be used to display newly created objects for data entry.

Validate()()()()
Validates a new Layout. THe "main form" layout type is not allowed
(Overrides Persistent.Validate()()()().)
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.)
Remarks

Layouts are part of the Persistate scheme to implement a user interface (the View in the Model/View/Controller architecture) which is both completely decoupled from the Controller, but also independent of the type of user interface. By this latter, we mean for example windows forms based, web based, XAML based, mobile based, etc..

A Layout defines the way that the elements or columns within a form or grid are laid out. Layouts belong to ObjectClasses and contain a number of Placements. Each placement is associated with a particular Member of the Layout's parent class, and portrays that member using a particular Format.

The whole structure of Layout, Placement and Format is independent of user interface type - the idea being that once defined, the same Layout can be implemented for each. When your code interacts with a UserInterface, it deals only in these abstract Layouts, and does not need to know anything about the implementation.

You create Layouts using the Persistate add-in. When you do this, Placements are generated for you in the layout using default Formats. You can then change the Formats you want for each Placement as you wish, including having no Format, meaning that the associated Member is not portrayed in that Layout. Once you have the Layouts as you wish, you then use the add-in to generate the corresponding forms and grids for your application's user interface. You can edit these using the IDE editors, and subsequently change the Layout and re-generate the forms. Persistate will preserve any modifications you made in the IDE editors.

There are two special fixed Layouts available which are not associated with an ObjectClass. The StatusStrip layout is used to show status information in a status bar. The DiverseLookup layout can show a lookup form for a diverse collection - a collection which can contain objects of diverse classes.

Inheritance Hierarchy

Assembly: Persistate (Module: Persistate) Version: 0.6.1.20 (0.6.1.20)