Home Reference Source

Function

Static Public Summary
public

adapt(target: object, source: object, propertyAdapter: object): object

适配数据

public

获取一对一映射的属性适配器

public

restore(model: object, propertyAdapter: object): object

还原数据

Static Public

public adapt(target: object, source: object, propertyAdapter: object): object source

import {adapt} from 'model-adapter/src/adapter-util.js'

适配数据

Params:

NameTypeAttributeDescription
target object
source object
propertyAdapter object

Return:

object

public getOneToOnePropertyAdapter(source: *): object source

import {getOneToOnePropertyAdapter} from 'model-adapter/src/adapter-util.js'

获取一对一映射的属性适配器

Params:

NameTypeAttributeDescription
source *

Return:

object

propertyAdapter

public restore(model: object, propertyAdapter: object): object source

import {restore} from 'model-adapter/src/adapter-util.js'

还原数据

Params:

NameTypeAttributeDescription
model object
propertyAdapter object

Return:

object