All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.qatools.mongodb.MongoAbstractStorage Maven / Gradle / Ivy

package ru.qatools.mongodb;

import ru.qatools.mongodb.util.SerializeUtil;

/**
 * @author Ilya Sadykov
 */
public class MongoAbstractStorage implements MongoBasicStorage {
    protected final Class entityClass;
    protected Serializer serializer = SerializeUtil::objectToBytes;
    protected Deserializer deserializer = SerializeUtil::objectFromBytes;

    public MongoAbstractStorage(Class entityClass) {
        this.entityClass = entityClass;
    }

    @Override
    public Serializer getSerializer() {
        return serializer;
    }

    public void setSerializer(Serializer serializer) {
        this.serializer = serializer;
    }

    @Override
    public Deserializer getDeserializer() {
        return deserializer;
    }

    public void setDeserializer(Deserializer deserializer) {
        this.deserializer = deserializer;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy