IRISLIB database
DataModel Class Reference

This is the abstract base class used by all model classes within the Zen Model-View-Controller mechanism. More...

Inheritance diagram for DataModel:
Collaboration diagram for DataModel:

Static Public Attributes

 READONLYMODEL = None
 This is the abstract base class used by all model classes within the Zen Model-View-Controller mechanism. More...
 
- Static Public Attributes inherited from RegisteredObject
 CAPTION = None
 Optional name used by the Form Wizard for a class when generating forms. More...
 
 JAVATYPE = None
 The Java type to be used when exported.
 
 PROPERTYVALIDATION = None
 This parameter controls the default validation behavior for the object. More...
 

Private Member Functions

_.Library.Status InvokeAction (_.Library.String pAction, _.Library.String pData)
 Invoke a user-defined named action on this model object. More...
 
_.Library.Status OnInvokeAction (_.Library.String pAction, _.Library.String pData)
 Invoke a user-defined named action on this model object. More...
 
_.Library.Status OnLoadModel (_.Library.RegisteredObject pSource)
 This callback method does the actual work of loading values. More...
 
_.Library.RegisteredObject OnNewSource (_.Library.Status pSC)
 This callback method is invoked when a DataModel needs a new instance. More...
 
_.Library.RegisteredObject OnOpenSource (_.Library.String pID, _.Library.Integer pConcurrency, _.Library.Status pSC)
 This callback method is invoked when a DataModel is opened. More...
 
_.Library.Status OnSaveSource (_.Library.RegisteredObject pSource)
 This callback method is called when the DataModel is saved. More...
 
_.Library.Status OnStoreModel (_.Library.RegisteredObject pSource)
 This callback method does the actual work of copying values. More...
 
_.Library.Status OnSubmit (_.ZEN.Submit pSubmit)
 If defined, this callback is called when a form connected to this. More...
 
_.Library.Status SaveModel ()
 Save the data in this instance of DataModel back to its original. More...
 

Static Private Member Functions

_.Library.Status DeleteModel (_.Library.String pID)
 Delete a given DataModel instance. More...
 
_.Library.Status GetPropertyInfo (_.Library.String pList, _.Library.Boolean pExtended, _.Library.String pContainer)
 Return a list describing the properties within this DataModel. More...
 
_.Library.Boolean IsReadOnly ()
 Returns whether this data model class is readonly.
 
_.Library.Status OnDeleteModel (_.Library.String pID)
 This callback method is invoked when the DataModel is deleted. More...
 
_.Library.Status OnDeleteSource (_.Library.String pID)
 This callback method is called when the DataModel is deleted. More...
 
_.Library.Status OnGetPropertyInfo (_.Library.Integer pIndex, _.Library.String pList, _.Library.Boolean pExtended)
 This callback method, if present, is called by the <method>GetPropertyInfo</method> More...
 
_.Library.RegisteredObject OpenModel (_.Library.String pID, _.Library.Integer pConcurrency, _.Library.Status pSC)
 Create an in-memory instance of a DataModel object and load. More...
 
_.Library.Status SubmitHandler (_.ZEN.Submit pSubmit)
 Internal method. More...
 

Additional Inherited Members

- Public Member Functions inherited from RegisteredObject
_.Library.Status OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount)
 This callback method is invoked when the current object is added to the SaveSet,. More...
 
_.Library.Status OnClose ()
 This callback method is invoked by the <METHOD>Close</METHOD> method to. More...
 
_.Library.Status OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned)
 This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More...
 
_.Library.Status OnNew ()
 This callback method is invoked by the <METHOD>New</METHOD> method to. More...
 
_.Library.Status OnValidateObject ()
 This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More...
 

Detailed Description

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.

Member Function Documentation

◆ DeleteModel()

_.Library.Status DeleteModel ( _.Library.String  pID)
staticprivate

Delete a given DataModel instance.


This is implemented by the subclasses of this class.

Reimplemented in ObjectDataModel.

◆ GetPropertyInfo()

_.Library.Status GetPropertyInfo ( _.Library.String  pList,
_.Library.Boolean  pExtended,
_.Library.String  pContainer 
)
staticprivate

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.

◆ InvokeAction()

_.Library.Status InvokeAction ( _.Library.String  pAction,
_.Library.String  pData 
)
private

Invoke a user-defined named action on this model object.


The actual work of perfoming the action is carried out by the <method>OnInvokeAction</method> callback method.

◆ OnDeleteModel()

_.Library.Status OnDeleteModel ( _.Library.String  pID)
staticprivate

This callback method is invoked when the DataModel is deleted.

This is implemented by the subclasses of this class.

Reimplemented in ObjectDataModel.

◆ OnDeleteSource()

_.Library.Status OnDeleteSource ( _.Library.String  pID)
staticprivate

This callback method is called when the DataModel is deleted.

If

implemented, it is responsible for making the appropriate deletes against the data source.

Reimplemented in ObjectDataModel, and Adaptor.

◆ OnGetPropertyInfo()

_.Library.Status OnGetPropertyInfo ( _.Library.Integer  pIndex,
_.Library.String  pList,
_.Library.Boolean  pExtended 
)
staticprivate

This callback method, if present, is called by the <method>GetPropertyInfo</method>

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.

◆ OnInvokeAction()

_.Library.Status OnInvokeAction ( _.Library.String  pAction,
_.Library.String  pData 
)
private

Invoke a user-defined named action on this model object.


This is implemented by the subclasses of this class.

◆ OnLoadModel()

_.Library.Status OnLoadModel ( _.Library.RegisteredObject  pSource)
private

This callback method does the actual work of loading values.

from the data source into this DataModel object.

Reimplemented in ObjectDataModel, KPI, and AbstractKPI.

◆ OnNewSource()

_.Library.RegisteredObject OnNewSource ( _.Library.Status  pSC)
private

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.

Reimplemented in ObjectDataModel.

◆ OnOpenSource()

_.Library.RegisteredObject OnOpenSource ( _.Library.String  pID,
_.Library.Integer  pConcurrency,
_.Library.Status  pSC 
)
private

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.

Reimplemented in ObjectDataModel, and Adaptor.

◆ OnSaveSource()

_.Library.Status OnSaveSource ( _.Library.RegisteredObject  pSource)
private

This callback method is called when the DataModel is saved.

If

implemented, it is responsible for saving changes to the data source.

Reimplemented in ObjectDataModel, and Adaptor.

◆ OnStoreModel()

_.Library.Status OnStoreModel ( _.Library.RegisteredObject  pSource)
private

This callback method does the actual work of copying values.

from the DataModel to the data source.

Reimplemented in ObjectDataModel.

◆ OnSubmit()

_.Library.Status OnSubmit ( _.ZEN.Submit  pSubmit)
private

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.

Reimplemented in reportPage, and ObjectDataModel.

◆ OpenModel()

_.Library.RegisteredObject OpenModel ( _.Library.String  pID,
_.Library.Integer  pConcurrency,
_.Library.Status  pSC 
)
staticprivate

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.

Reimplemented in ObjectDataModel.

◆ SaveModel()

_.Library.Status SaveModel ( )
private

Save the data in this instance of DataModel back to its original.

source, if possible.
This is implemented by the subclasses of this class.

Reimplemented in ObjectDataModel.

◆ SubmitHandler()

_.Library.Status SubmitHandler ( _.ZEN.Submit  pSubmit)
staticprivate

Internal method.


If a form connected to this DataModel is submitted, this method handles the server-side processing of the submit.

Reimplemented in ObjectDataModel.

Member Data Documentation

◆ READONLYMODEL

READONLYMODEL = None
static

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.

If this parameter is true, then this is a read-only data model.

Instances of this data model cannot be saved or deleted.