com.itcoon.common.jpa.converter.AbstractJpaEnumConverter Maven / Gradle / Ivy
package com.itcoon.common.jpa.converter;
import com.itcoon.common.core.converter.AbstractEnumConverter;
import com.itcoon.common.core.enums.ValueEnum;
import javax.persistence.AttributeConverter;
/**
* @author Miaoxia Yu
* @date 2020-11-19
*/
public abstract class AbstractJpaEnumConverter& ValueEnum, V> extends AbstractEnumConverter implements AttributeConverter {
protected AbstractJpaEnumConverter(Class clazz) {
super(clazz);
}
@Override
public V convertToDatabaseColumn(E e) {
return super.reverseConvert(e);
}
@Override
public E convertToEntityAttribute(V v) {
return super.convert(v);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy