Class: RawPropertyValueToObjectConverter

RawPropertyValueToObjectConverter

Converts a property value of raw data to the referenced object.

Constructor

new RawPropertyValueToObjectConverter()

Source:

Extends

Members

(nullable) _descriptorToFetch :ObjectDescriptorReference

The descriptor for which to perform the fetch. This returns foreignDescriptor, if it exists, and otherwise returns objectDescriptor.
Type:
  • ObjectDescriptorReference
Source:

allowPartialConversion :boolean

Specifies whether the converter allows partial conversion.
Type:
  • boolean
Inherited From:
Default Value:
  • true
Source:

convertExpression :string

The expression used to convert a raw value into a modeled one, for example a foreign property value into the objet it represents.
Type:
  • string
Source:

convertSyntax :Object

Object created by parsing .convertExpression using frb/grammar.js that will be used to initialize the convert query criteria
Type:
  • Object
Source:

(nullable) foreignDescriptor :ObjectDescriptorReference

The descriptor of the destination object. If one is not provided, .objectDescriptor will be used. If .objectDescriptor is not provided, the value descriptor of the property descriptor that defines the relationship will be used.
Type:
  • ObjectDescriptorReference
Source:

initWithConvertExpression

Source:

(nullable) objectDescriptor :ObjectDescriptorReference

The descriptor of the source object. It will be used only if it is provided and .foreignDescriptor is not provided.
Type:
  • ObjectDescriptorReference
Source:

revertExpression :string

The expression used to revert the modeled value into a raw one. For example, reverting an object into it's primary key.
Type:
  • string
Source:

revertSyntax :Object

Object created by parsing .revertExpression using frb/grammar.js that will be used to revert the modeled value into a raw one
Type:
  • Object
Source:

(nullable) scope :Scope

Scope with which convert and revert expressions are evaluated.
Type:
  • Scope
Source:

service

The service to use to make requests.
Source:

serviceIdentifier

Identifier of the child of .service that the query should be routed to
Source:

Methods

convert(v) → {Promise}

Converts the fault for the relationship to an actual object that has an ObjectDescriptor.
Parameters:
Name Type Description
v Property The value to format.
Overrides:
Source:
Returns:
A promise for the referenced object. The promise is fulfilled after the object is successfully fetched.
Type
Promise

revert(v) → {string}

Reverts the relationship back to raw data.
Parameters:
Name Type Description
v Scope The value to revert.
Overrides:
Source:
Returns:
v
Type
string