Class: PatchContent

PatchContent

Helper class to gather information about a patch during parsing time.


new PatchContent()

Creates an instance of PatchContent.

Methods


addCreateOperation(tag)

Registers a create operation

Parameters:
Name Type Description
tag string

addDeleteOperation(tag)

Registers a delete operation

Parameters:
Name Type Description
tag string

addModelRelation(tag, modelTag)

Registers the creation of relation between an instance and its model

Parameters:
Name Type Description
tag string
modelTag string

getModelRelation(tag)

Returns the tag of the model if the model relation was previously registered.

Parameters:
Name Type Description
tag string
Returns:
Type
string

hasCreateOperation(tag)

Returns true if the patch contains a create operation for the specified instance

Parameters:
Name Type Description
tag string
Returns:
Type
boolean

hasDeleteOperation(tag)

Returns true if the patch contains a delete operation for the specified instance

Parameters:
Name Type Description
tag string
Returns:
Type
boolean