toggle menu
ZappBase
androidJvm
switch theme
search in API
Core
/
com.zappstudio.zappbase.data.mapper
/
IMapperWebService
IMapper
Web
Service
interface
IMapperWebService
<
Entity
,
Model
>
:
IMapper
<
Entity
,
Model
>
,
KoinComponent
Created by alvaro on 21/3/18.
Members
Properties
gson
Link copied to clipboard
open
val
gson
:
Gson
Functions
entity
To
Json
Link copied to clipboard
open
fun
entityToJson
(
entity
:
Entity
)
:
JsonObject
entity
To
Json
Array
Link copied to clipboard
open
fun
entityToJsonArray
(
entities
:
MutableList
<
Entity
>
)
:
JsonArray
get
Class
Entity
Link copied to clipboard
abstract
fun
getClassEntity
(
)
:
Class
<
Entity
>
get
Class
List
Entity
Link copied to clipboard
abstract
fun
getClassListEntity
(
)
:
Type
get
Koin
Link copied to clipboard
open
fun
getKoin
(
)
:
Koin
model
To
Json
Link copied to clipboard
open
fun
modelToJson
(
model
:
Model
)
:
JsonObject
model
To
Json
Array
Link copied to clipboard
open
fun
modelToJsonArray
(
models
:
MutableList
<
Model
>
)
:
JsonArray
to
Entity
Link copied to clipboard
open
fun
toEntity
(
model
:
Model
)
:
Entity
open
fun
toEntity
(
jsonElement
:
JsonObject
)
:
Entity
open
fun
toEntity
(
json
:
String
)
:
Entity
to
List
Entity
Link copied to clipboard
open
fun
toListEntity
(
entities
:
MutableList
<
Model
>
)
:
MutableList
<
Entity
>
open
fun
toListEntity
(
jsonArray
:
JsonArray
)
:
MutableList
<
Entity
>
to
List
Model
Link copied to clipboard
open
fun
toListModel
(
entities
:
MutableList
<
Entity
>
)
:
MutableList
<
Model
>
open
fun
toListModel
(
jsonArray
:
JsonArray
)
:
MutableList
<
Model
>
to
Model
Link copied to clipboard
abstract
fun
toModel
(
entity
:
Entity
)
:
Model
open
fun
toModel
(
jsonObject
:
JsonObject
)
:
Model
open
fun
toModel
(
json
:
String
)
:
Model