Class UriConverter

java.lang.Object
nl.knaw.dans.convert.jpa.UriConverter
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 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>