Class GsonVdmEntityListAdapter<T>
java.lang.Object
com.google.gson.TypeAdapter<List<T>>
com.sap.cloud.sdk.datamodel.odatav4.adapter.GsonVdmEntityListAdapter<T>
- Type Parameters:
T
- The entity type.
For internal use only by data model classes.
-
Constructor Summary
ConstructorsConstructorDescriptionGsonVdmEntityListAdapter
(com.google.gson.Gson gson, com.google.gson.TypeAdapter<T> entityAdapter) For internal use only by data model classes. -
Method Summary
Methods inherited from class com.google.gson.TypeAdapter
fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
-
Constructor Details
-
GsonVdmEntityListAdapter
public GsonVdmEntityListAdapter(@Nonnull com.google.gson.Gson gson, @Nonnull com.google.gson.TypeAdapter<T> entityAdapter) For internal use only by data model classes.- Parameters:
gson
- The GSON instance.entityAdapter
- The entity adapter.
-
-
Method Details
-
read
For internal use only by data model classes.- Specified by:
read
in classcom.google.gson.TypeAdapter<List<T>>
- Parameters:
in
- The JsonReader reference.- Returns:
- The deserialized List of entities.
- Throws:
IOException
- When deserialization failed.
-
write
public void write(@Nonnull com.google.gson.stream.JsonWriter out, @Nullable List<T> entityList) throws IOException For internal use only by data model classes.- Specified by:
write
in classcom.google.gson.TypeAdapter<List<T>>
- Parameters:
out
- The JsonWriter reference.entityList
- The list of entities.- Throws:
IOException
- When serialization failed.
-