Class

GraphObject

GraphObject()

The abstract root class for all managed objects

Constructor

new GraphObject()

View Source graph-object.js, line 50

Members

abstract identifier

The getter return a property which serves as the identity in the store. The value should be suitable to act as both an object and a map key.

View Source graph-object.js, line 171

abstract identifier

The setter must record the value as the instance identity in the store.

View Source graph-object.js, line 178

state

Return the current instance state, ["clean", "deleted", "dirty", "new"], to reflect the correspondence between the instance state and that in the store.

View Source graph-object.js, line 186

Methods

asPatch()

compute the put/patch/delete patch given the object state implement as properties of the base function to permit extension

View Source graph-object.js, line 260

createProxy()

The final step of GraphObject base constructor invokes this to create the proxy which wraps the target instance and manages its property access. It excludes those which begin with '_' and limits control to GraphObject#managedProperties, if specified. Object#set is augmented to record modifcations and Object#get can be augmented perform property-specific retrieval. Set modifies instance state as a side-effect. As a special case, given get('_self'), it returns the target instance.

View Source graph-object.js, line 85

initializeInstance()

Provide a method to perform general initialization out-of-line.

View Source graph-object.js, line 73

initializeState()

Provide a method to initialize the code properies from the constructor out-of-line and for direct object creation

View Source graph-object.js, line 62

managedProperties()

Return an array of the names of managed properties, to be managed by the proxy.

View Source graph-object.js, line 224

oncreate(deltas)

Accept a delta-array with the state of the new instance.

Parameters:
Name Type Description
deltas

[ [String, Any], ...]

View Source graph-object.js, line 194

ondelete(deltas)

Notify that the instance has been deleted from the store.

Parameters:
Name Type Description
deltas

[ [String, Any], ...] should include just the identifier property.

View Source graph-object.js, line 206

onupdate(deltas)

Accept a delta-array with changes to the state of the new instance.

Parameters:
Name Type Description
deltas

[ [String, Any], ...]

View Source graph-object.js, line 200

persistentProperties()

Return an array of the names of persistent properties, to be managed by the proxy.

View Source graph-object.js, line 232

persistentValues()

Return an array of the values of persistent properties.

View Source graph-object.js, line 211

rollback()

Use a delta array to restore the state of the target instance. nb. also undefined values, could restrict to null

View Source graph-object.js, line 274

rollforward()

Use a delta array to assert the new state of the target instance. nb. also undefined values, could restrict to null

View Source graph-object.js, line 286

transactionalProperties()

Return an array of the names of properties subject to roll-back when a transaction is aborted.

View Source graph-object.js, line 251