Class: BasicType

metamodel.BasicType(ref, typeConstructor, noResolvingopt)

new BasicType(ref, typeConstructor, noResolvingopt)

Creates a new instance of a native db type

Parameters:
Name Type Attributes Description
ref string

The db ref of this type

typeConstructor Class.<*>

The javascript class of this type

noResolving boolean <optional>

Indicates if this type is not the main type of the constructor

Source:

Extends

Members

(readonly) isBasic :boolean

Type:
  • boolean
Inherited From:
Source:

(readonly) isEmbeddable :boolean

Type:
  • boolean
Inherited From:
Source:

(readonly) isEntity :boolean

Type:
  • boolean
Inherited From:
Source:

(readonly) isMappedSuperclass :boolean

Type:
  • boolean
Inherited From:
Source:

name :string

Type:
  • string
Inherited From:
Source:

noResolving :boolean

Indicates if this type is not the main type of the constructor

Type:
  • boolean
Source:

(readonly) persistenceType :number

The persistent type of this type

Type:
  • number
Overrides:
Source:

ref :string

Type:
  • string
Inherited From:
Source:

typeConstructor

Overrides:
Source:

Methods

fromJsonValue(state, jsonValue, currentValue, options) → {*}

Merge the json data into the current object instance and returns the merged object

Parameters:
Name Type Description
state util.Metadata

The root object state

jsonValue json

The json data to merge

currentValue *

The object where the jsonObject will be merged into, if the current object is null,
a new instance will be created

options Object

additional options which are applied through the conversion

Properties
Name Type Attributes Default Description
onlyMetadata boolean <optional>
false

Indicates that only the metadata should be updated of the object

Overrides:
Source:
Returns:

The merged object instance

Type
*

toJsonValue(state, object, options) → {json}

Converts the given object to json

Parameters:
Name Type Description
state util.Metadata

The root object state

object *

The object to convert

options Object

additional options which are applied through the conversion

Properties
Name Type Attributes Default Description
excludeMetadata boolean <optional>
false

Indicates that no metadata should be exposed on the generated json

depth number | boolean <optional>
0

The object depth to serialize

Overrides:
Source:
Returns:

The converted object as json

Type
json