%ZEN.DataModel.DataModel
abstract class %ZEN.DataModel.DataModel
extends
This is the abstract base class used by all model classes within
the Zen Model-View-Controller mechanism.
Subclasses of this class are used to implement the Model portion of the Zen
Model-View-Controller mechanism.
A DataModel class provides a generic mechanism to take
data values from one or more sources (such as from a persistent object,
external database, or directly from a global) and place these
values into the properties of the DataModel.
Inventory
Summary
Properties | ||
---|---|---|
%id | %seriesCount | %seriesNames |
Subclasses | ||
---|---|---|
%DeepSee.ResultSet | %ZEN.DataModel.ObjectDataModel | Ens.MetricModel |
Parameters
If this parameter is true, then this is a read-only data model. Instances of this data model cannot be saved or deleted.
Properties
The ID value used to identify a specific instance of DataModel object.
The form and possible values of the ID are up the implementor of a specific DataModel class.
Number of data series contained within the data model.
An array containing the display names for data series subscripted by series number (1-based).
Methods
Delete a given DataModel instance.
This is implemented by the subclasses of this class.
Return a list describing the properties within this DataModel.
These are returned as an array of the form:
pList(propname) = seqno
seqno, if present, is the ordinal position of this control on the form.
If pExtended is true (1), then the array will include additional nodes for each property. This information is used to create dynamic forms for this model. The extra nodes may include:
pList(name,"%type") = suggested control type for dynaForm<.br> pList(name,"size") = size used for controls.
pList(name,"group") = id of group within dynaForm to place control.
pContainer is the name of the containing property if this data model is embedded in another data model object.
Invoke a user-defined named action on this model object.
The actual work of perfoming the action is carried out by the%OnInvokeAction callback method.
Returns whether this data model class is readonly.
This callback method is invoked when the DataModel is deleted. This is implemented by the subclasses of this class.
This callback method is called when the DataModel is deleted. If implemented, it is responsible for making the appropriate deletes against the data source.
This callback method, if present, is called by the%GetPropertyInfo method. This gives subclasses the opportunity to add additional property descriptions to the DataModel.
pIndex is the number of elements (plus one) already in the list. This should be used as a starting sequence number when adding new properties to the list.
Invoke a user-defined named action on this model object.
This is implemented by the subclasses of this class.
This callback method does the actual work of loading values from the data source into this DataModel object.
This callback method is invoked when a DataModel needs a new instance. If implemented, it opens a new (unsaved) instance of the data source object used by the DataModel.
This callback method is invoked when a DataModel is opened. If implemented, it opens an instance of the data source object used by the DataModel.
This callback method is called when the DataModel is saved. If implemented, it is responsible for saving changes to the data source.
This callback method does the actual work of copying values from the DataModel to the data source.
If defined, this callback is called when a form connected to this DataModel is submitted.
The contents of this DataModel will be filled in from the submitted values before this callback is invoked.
Create an in-memory instance of a DataModel object and load data into it properties.
This is implemented by the subclasses of this class. The signature of this method is designed to match the %OpenId method of persistent classes.
Save the data in this instance of DataModel back to its original source, if possible.
This is implemented by the subclasses of this class.
Internal method.
If a form connected to this DataModel is submitted, this method handles the server-side processing of the submit.