Commit b12f7c40 authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

change type of stringListConverter

parent f942124a
...@@ -2,6 +2,7 @@ package com.biganto.visual.roompark.data.repository.db.requrey.utils; ...@@ -2,6 +2,7 @@ package com.biganto.visual.roompark.data.repository.db.requrey.utils;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List;
import io.requery.Converter; import io.requery.Converter;
...@@ -10,14 +11,14 @@ import io.requery.Converter; ...@@ -10,14 +11,14 @@ import io.requery.Converter;
*/ */
public class StringListConverter implements Converter<ArrayList<String>, String> { public class StringListConverter implements Converter<List<String>, String> {
private static final String stringDelimiter ="¹/|¹"; private static final String stringDelimiter ="¹/|¹";
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public Class<ArrayList<String>> getMappedType() { public Class<List<String>> getMappedType() {
return (Class)ArrayList.class; return (Class)List.class;
} }
@Override @Override
...@@ -31,7 +32,7 @@ public class StringListConverter implements Converter<ArrayList<String>, String> ...@@ -31,7 +32,7 @@ public class StringListConverter implements Converter<ArrayList<String>, String>
} }
@Override @Override
public String convertToPersisted(ArrayList<String> value) { public String convertToPersisted(List<String> value) {
if (value == null) { if (value == null) {
return ""; return "";
} }
...@@ -48,7 +49,7 @@ public class StringListConverter implements Converter<ArrayList<String>, String> ...@@ -48,7 +49,7 @@ public class StringListConverter implements Converter<ArrayList<String>, String>
} }
@Override @Override
public ArrayList<String> convertToMapped(Class<? extends ArrayList<String>> type, public List<String> convertToMapped(Class<? extends List<String>> type,
String value) { String value) {
ArrayList<String> list = new ArrayList<>(); ArrayList<String> list = new ArrayList<>();
if (value != null) { if (value != null) {
......
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