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

de.ppi.deepsampler.persistence.bean.ext.StandardBeanFactoryExtension Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version
/*
 * Copyright 2020  PPI AG (Hamburg, Germany)
 * This program is made available under the terms of the MIT License.
 */

package de.ppi.deepsampler.persistence.bean.ext;

import de.ppi.deepsampler.persistence.model.PersistentBean;
import de.ppi.deepsampler.persistence.bean.PersistentBeanFactory;

public abstract class StandardBeanFactoryExtension implements BeanFactoryExtension {

    @Override
    public boolean skip(Class beanCls) {
        return false;
    }

    @Override
    public PersistentBean toBean(Object bean) {
        return new PersistentBeanFactory().toBean(bean);
    }

    @Override
    public  T ofBean(PersistentBean bean, Class cls) {
        return new PersistentBeanFactory().createValueFromPersistentBean(bean, cls);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy