br.com.anteros.nosql.persistence.mongodb.converters.MongoByteConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Anteros-NoSql-Persistence-MongoDB Show documentation
Show all versions of Anteros-NoSql-Persistence-MongoDB Show documentation
Anteros NoSQL Persistence MongoDB.
package br.com.anteros.nosql.persistence.mongodb.converters;
import org.bson.types.Binary;
import br.com.anteros.nosql.persistence.converters.ByteConverter;
import br.com.anteros.nosql.persistence.metadata.NoSQLDescriptionField;
public class MongoByteConverter extends ByteConverter{
@Override
public Object decode(Class> targetClass, Object val, NoSQLDescriptionField descriptionField) {
if (val instanceof Binary) {
return ((Binary)val).getData();
}
return super.decode(targetClass, val, descriptionField);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy