This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.test.objectbox.models | |
import io.objectbox.annotation.Convert | |
import io.objectbox.annotation.Entity | |
import io.objectbox.annotation.Id | |
@Entity data class Article( | |
@Id var id: Long = 0, | |
@Convert(converter = StringListConverter::class, dbType = String::class) | |
var strings: List<String>? = null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.test.objectbox.converters | |
import io.objectbox.converter.PropertyConverter | |
/** | |
* Created by milenkojovanovic on 9/14/17. | |
*/ | |
class StringListConverter : PropertyConverter<List<String>, String> { | |
override fun convertToEntityProperty(databaseValue: String?): List<String> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by milechainsaw on 7/19/16. | |
* | |
* Exponential backoff callback for Retrofit2 | |
* | |
*/ | |
public abstract class BackoffCallback<T> implements Callback<T> { | |
private static final int RETRY_COUNT = 3; | |
/** | |
* Base retry delay for exponential backoff, in Milliseconds |