DATACASS-547 - Resolve converter ambiguities.

We now properly annotate read and writing converters to indicate proper conversion directions.
This commit is contained in:
Mark Paluch
2018-04-19 10:06:31 +02:00
parent 02270f77e3
commit 293f1ef9d4

View File

@@ -21,6 +21,8 @@ import java.util.Collection;
import java.util.List;
import org.springframework.core.convert.converter.Converter;
import org.springframework.data.convert.ReadingConverter;
import org.springframework.data.convert.WritingConverter;
/**
* Helper class to register JodaTime specific {@link Converter} implementations in case the library is present on the
@@ -53,6 +55,7 @@ public abstract class CassandraJsr310Converters {
*
* @author Mark Paluch
*/
@ReadingConverter
public enum CassandraLocalDateToLocalDateConverter
implements Converter<com.datastax.driver.core.LocalDate, LocalDate> {
@@ -69,6 +72,7 @@ public abstract class CassandraJsr310Converters {
*
* @author Mark Paluch
*/
@WritingConverter
public enum LocalDateToCassandraLocalDateConverter
implements Converter<LocalDate, com.datastax.driver.core.LocalDate> {