Commit 8aac1b49 authored by yashkhem1's avatar yashkhem1

Update Convertors.java

parent 3a6c3a31
......@@ -72,6 +72,20 @@ public class Converters {
return json;
}
@TypeConverter
public static List<Role> rolesfromString(String value){
Type listType = new TypeToken<List<Role>>(){
}.getType();
return new Gson().fromJson(value, listType);
}
@TypeConverter
public static String stringfromRoles(List<Role> list){
Gson gson = new Gson();
String json= gson.toJson(list);
return json;
}
@TypeConverter
public static Timestamp timestampfromString(String value) {
try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment