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

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

There is a newer version: 2.1.0
Show newest version
/*
 * Copyright 2022 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.bean.PersistentBeanConverter;

import java.lang.reflect.ParameterizedType;

public abstract class StandardBeanConverterExtension implements BeanConverterExtension {


    @Override
    public boolean skip(Class beanClass, ParameterizedType beanType) {
        return false;
    }

    @Override
    public Object convert(Object originalBean, ParameterizedType beanType, PersistentBeanConverter persistentBeanConverter) {
        return originalBean;
    }

    @Override
    @SuppressWarnings("unchecked")
    public  T revert(Object persistentBean, Class targetClass, ParameterizedType type, PersistentBeanConverter persistentBeanConverter) {
        return (T) persistentBean;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy