Class: Type

metamodel.Type(ref, typeConstructoropt)

new Type(ref, typeConstructoropt)

Parameters:
Name Type Attributes Description
ref string
typeConstructor Class.<*> <optional>
Source:

Members

(static) PersistenceType :number

Type:
  • number
Properties:
Name Type Description
BASIC number
EMBEDDABLE number
ENTITY number
MAPPED_SUPERCLASS number
Source:

(readonly) isBasic :boolean

Type:
  • boolean
Source:

(readonly) isEmbeddable :boolean

Type:
  • boolean
Source:

(readonly) isEntity :boolean

Type:
  • boolean
Source:

(readonly) isMappedSuperclass :boolean

Type:
  • boolean
Source:

name :string

Type:
  • string
Source:

(abstract, readonly) persistenceType :number

The persistent type of this type

Type:
  • number
Source:

ref :string

Type:
  • string
Source:

typeConstructor

Source:

typeConstructor

Source:

Methods

(abstract) 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

Source:
Returns:

The merged object instance

Type
*

(abstract) 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

Source:
Returns:

The converted object as json

Type
json