- All Implemented Interfaces:
javax.persistence.AttributeConverter<URI,String>
public class UriConverter
extends Object
implements javax.persistence.AttributeConverter<URI,String>
JPA converter for
URI
attributes. This converter is used to store
URI
objects in the database as a string.
-
Constructor Summary
Constructors
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
UriConverter
public UriConverter()
-
Method Details
-
convertToDatabaseColumn
public String convertToDatabaseColumn(URI uri)
- Specified by:
convertToDatabaseColumn
in interface javax.persistence.AttributeConverter<URI,String>
-
convertToEntityAttribute
public URI convertToEntityAttribute(String uri)
- Specified by:
convertToEntityAttribute
in interface javax.persistence.AttributeConverter<URI,String>