[This is preliminary documentation and is subject to change.]
C# |
public class Package : Persistent, IMetaReferable
All Members | Methods | Properties | Fields | Events | |
Icon | Member | Description |
---|---|---|
AddTargetDatabase(Database, UserInterface) | Adds a new target Database for this Package.
| |
AddTargetDatabases(IEnumerable<(Of <<'(Database>)>>), UserInterface) | Adds one or more target Databases for
this Package. | |
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.) | |
ClassCategories | The set of ClassCategories in the Package. | |
ClassCategoriesCount | Gets the number of items in the ClassCategories collection. | |
ClassFlags | Gets the class flags for the Package class. (Overrides Persistent.ClassFlags.) | |
Clone()()()() | Creates a copy of this object. (Inherited from Persistent.) | |
Collection()()()() | Creates a Package collection to contain provisional objects. | |
Collection(Persistent, FlagSet, Int32, Boolean) | Creates a Package collection to contain persistent objects. | |
ContainingEnvironment | Gets the Environment that this object is contained within.
(Inherited from Persistent.) | |
Controller | The Controller Module which contains the classes generated to
hold the methods to implement the Operations defined for this Package.
| |
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.) | |
DefaultLayoutStyle | The LayoutStyle that will be used to display Layouts of this Package's ObjectClasses which do not
have a LayoutStyle set. | |
DefinitionFileName | Gets the name of the definition file for this package. | |
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 by
returning the object indexed by the given collection indicator and name
| |
DesktopUiModule | Gets the package's desktop user interface Module,
or null if the package does not contain a desktop user interface.
| |
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.) | |
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.) | |
FindWorkspace(String) | Finds a named Workspace within this package.
| |
FrameworkVersion | Property for framework version. | |
FriendlyName | This is the display or friendly name of the Package, used in
messages displayed to the user. | |
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).) | |
GetObjectClasses()()()() | Gets a collection of all the ObjectClasses in this package. | |
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.) | |
HoldingDatabase | The Database holding the Package object and the persistent tree
under it. | |
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. | |
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.) | |
Model | The Model module for this package which contains all the classes
generated to model the persistent classes in the package. | |
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 Package name is used for the name of the Persistate
definition file, the solution created in the IDE, and as the first part of
the name of the Modules within the Packge.
| |
NameKey | Key value for name index. | |
NominativeText | Gets a string containing values of nominative properties. (Overrides Persistent.NominativeText.) | |
ObjectClasses | Property for object classes. | |
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.) | |
ParentEnvironment | Gets the Parent object as a Environment. | |
ParentReference | Gets a Reference to this object's parent object.
(Inherited from Persistent.) | |
PersistentClasses | The set of PersistentClasses in the Package. | |
PersistentClassesCount | Gets the number of items in the PersistentClasses 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.) | |
SecurePackage | Property for secure package. | |
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.) | |
SourceDefinitions | This property is now obsolete. | |
StartUp | The Module used to create an executable to run this package in
stand-alone mode. | |
StoreInDatabase(Database) | Marks this object so that it will be stored in a particular Database. (Inherited from Persistent.) | |
TargetDatabases | The set of Databases which can hold instances of ObjectClasses defined in this Package. | |
TargetDatabasesCount | Gets the number of items in the TargetDatabases collection. | |
TargetLanguage | The .Net language used for the IDE solution and projects for this
Package, and for all code generation. | |
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.) | |
UsedPackages | The set of other Packages used by this one. | |
UsedPackagesCount | Gets the number of items in the UsedPackages collection. | |
UserInterfaces | The set of user interface Modules which contain the classes and
other items used to create the user interfaces to this Package. | |
UserInterfacesCount | Gets the number of items in the UserInterfaces collection. | |
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.) | |
Workspaces | The set of Workspaces in the Package | |
WorkspacesCount | Gets the number of items in the Workspaces collection. | |
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.) |
A Package represents a Persistate application, or a major part of one. Persistate implements the industry standard MVC (Model View Controller) application architecture. In Persistate we use the term user interface in place of View, as the latter term is used in the 'database view' meaning. Consequently, a package contains a number of Modules, one Model, one Controller, and one or more UserInterfaces. In addition there is a StartUp Module, which is used to launch the application when it is run in stand-alone mode.
When you create a Package using the Persistate add-in, Persistate will create a solution in the IDE for you, and within that, one project for each module. This means that each Module corresponds to a .Net assembly - all of them DLLs, except for the StartUp Module which will be an executable.
A package is primarily a container for the PersistentClasses that you define for your application. These can be ObjectClasses, DataClasses or ViewClasses. You define these classes by writing a definition file in the English like Persistate definition language. You then user the Persistate add-in to create the C# classes which implement the defined Persistate classes in memory, as well as creating the necessary database objects to store instances of your classes in persistent storage.
As well as classes, you can define ClassCategories and Workspaces in your definition file. You probably won't need many or any of the former, as there are a good set of categories defined for you in the standard Persistate Package. However, you will usually define at least one Workspace if your application uses a user interface, as these describe the arrangement of the Panes in your application windows.
When you write your definition file you can import and use the classes from other Packages using the Use statement. Before you process your definition file you must add any thus named Packages into the UsedPackages collection. Normally you will do this using the Persistate add-in.
Packages are contained in a parent Environment object, and this is their development environment. They can be added to the UsedPackages collection of any number of other environments. In both cases, any singleton objects defined in the Package will become entry points in the Environment. In other words, the Environment will contain a persistent sub-tree as defined in the Package definition file.
Before you can store objects defined in a Package in persistent storage, you must first prepare one or more Databases by giving them the necessary database objects (tables, views, etc..). You normally do this using the Persistate add-in, but you can also use the AddTargetDatabase method, which does the necessary and adds the database to the TargetDatabases collection.
Object | ||
Persistent | ||
Package |