# Class: RawPropertyValueToObjectConverter

## RawPropertyValueToObjectConverter

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

## Constructor

#### new RawPropertyValueToObjectConverter()

Source:
  - data/converter/raw-property-value-to-object-converter.js, line 9

### Extends

- Converter

### 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:
  - data/converter/raw-property-value-to-object-converter.js, line 222

#### allowPartialConversion :boolean

Specifies whether the converter allows partial conversion.

##### Type:

- boolean

Inherited From:
  - Converter#allowPartialConversion
Default Value:
  - true
Source:
  - core/converter/converter.js, line 83

#### 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:
  - data/converter/raw-property-value-to-object-converter.js, line 102

#### convertSyntax :Object

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

##### Type:

- Object

Source:
  - data/converter/raw-property-value-to-object-converter.js, line 124

#### (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:
  - data/converter/raw-property-value-to-object-converter.js, line 177

#### initWithConvertExpression

Source:
  - data/converter/raw-property-value-to-object-converter.js, line 82

#### (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:
  - data/converter/raw-property-value-to-object-converter.js, line 192

#### 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:
  - data/converter/raw-property-value-to-object-converter.js, line 142

#### 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:
  - data/converter/raw-property-value-to-object-converter.js, line 163

#### (nullable) scope :Scope

Scope with which convert and revert expressions are evaluated.

##### Type:

- Scope

Source:
  - data/converter/raw-property-value-to-object-converter.js, line 252

#### service

The service to use to make requests.

Source:
  - data/converter/raw-property-value-to-object-converter.js, line 261

#### serviceIdentifier

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

Source:
  - data/converter/raw-property-value-to-object-converter.js, line 275

### 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:
  - Converter#convert
Source:
  - data/converter/raw-property-value-to-object-converter.js, line 290

##### 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:
  - Converter#revert
Source:
  - data/converter/raw-property-value-to-object-converter.js, line 320

##### Returns:

v

Type
  string