--- /dev/null
+package de.juplo.jpa.converters;
+
+import java.net.URI;
+import javax.persistence.AttributeConverter;
+import javax.persistence.Converter;
+
+
+/**
+ * Converts an {@link URI} to its ASCII-representation
+ * @author Kai Moritz
+ */
+@Converter(autoApply = true)
+public class URIConverter implements AttributeConverter<URI, String>
+{
+ @Override
+ public String convertToDatabaseColumn(URI uri)
+ {
+ return uri.toASCIIString();
+ }
+
+ @Override
+ public URI convertToEntityAttribute(String string)
+ {
+ return URI.create(string);
+ }
+}