com.kenshoo.pl.entity.converters.IdentityValueConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of persistence-layer Show documentation
Show all versions of persistence-layer Show documentation
A Java persistence layer based on JOOQ for high performance and business flow support.
package com.kenshoo.pl.entity.converters;
import com.kenshoo.pl.entity.ValueConverter;
public class IdentityValueConverter implements ValueConverter {
private final Class valueClass;
public static ValueConverter getInstance(Class valueClass) {
return new IdentityValueConverter<>(valueClass);
}
public IdentityValueConverter(Class valueClass) {
this.valueClass = valueClass;
}
@Override
public T convertTo(T value) {
return value;
}
@Override
public T convertFrom(T value) {
return value;
}
@Override
public Class getValueClass() {
return valueClass;
}
}