The interface for AttributeConverter is as follows:
public interface AttributeConverter<X,Y> {
public Y convertToDatabaseColumn (X attribute);
public X convertToEntityAttribute (Y dbData);
}
In my implementation, I'd like to know a little about the Entity and the Field of the Entity the converter is running on. For instance: should this Converter decrypt this field for the application or not?
JAX-RS has the concept of @Context which is pretty handy. Curious if JPA has an equivalent concept.