io.oasp.module.beanmapping.common.impl.dozer.IdentityConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of oasp4j-beanmapping Show documentation
Show all versions of oasp4j-beanmapping Show documentation
Minimal shim for bean mapping to convert between compatible Java beans (e.g. JPA entity to transfer-object and vice versa).
package io.oasp.module.beanmapping.common.impl.dozer;
import org.dozer.CustomConverter;
/**
* Dozer {@link CustomConverter} that returns the original source object reference (identity conversion).
*
*/
public class IdentityConverter implements CustomConverter {
/**
* The constructor.
*/
public IdentityConverter() {
super();
}
@Override
public Object convert(Object destination, Object source, Class> destinationClass, Class> sourceClass) {
return source;
}
}