Constructor
new RawPropertyValueToObjectConverter()
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
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
convertSyntax :Object
Object created by parsing .convertExpression using frb/grammar.js that will
be used to initialize the convert query criteria
Type:
- Object
(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
initWithConvertExpression
(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
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
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
(nullable) scope :Scope
Scope with which convert and revert expressions are evaluated.
Type:
- Scope
service
The service to use to make requests.
serviceIdentifier
Identifier of the child of .service that the query should be routed to
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