Skip to main content

%pkg.isc.rest.model.adaptor

abstract class %pkg.isc.rest.model.adaptor extends %pkg.isc.rest.model.dbMappedResource

A class may extend %Persistent, %pkg.isc.rest.model.adaptor, and %JSON.Adaptor to grant automatic (but gated) rest exposure of a particular representation.

Method Inventory

Parameters

final parameter SOURCECLASS = $classname();
For an adapted class, the class itself is the source.

Methods

final classmethod DeleteModelInstance(pID As %String) as %Boolean
Deletes an instance of this model, based on the identifier pID
final classmethod GetModelFromObject(object As %Persistent) as %pkg.isc.rest.model.adaptor
Uses the data from a persistent object to populate the properties of this model.
final method JSONExport() as %Status
Serialize a JSON enabled class as a JSON document and write it to the current device.
final method JSONExportToStream(ByRef export As %Stream.Object) as %Status
Serialize a JSON enabled class as a JSON document and write it to a stream.
final method JSONExportToString(ByRef %export As %String) as %Status
Serialize a JSON enabled class as a JSON document and return it as a string.
final method JSONImport(input) as %Status
JSONImport imports JSON or dynamic object input into this object.
The input argument is either JSON as a string or stream, or a subclass of %DynamicAbstractObject.
final method SaveModelInstance(pUserContext As %RegisteredObject)
Saves the model instance

Inherited Members

Inherited Methods

Subclasses

FeedbackOpens in a new tab