Class UrnUuidConverter

java.lang.Object
nl.knaw.dans.convert.jpa.UrnUuidConverter
All Implemented Interfaces:
javax.persistence.AttributeConverter<URI,String>

public class UrnUuidConverter extends Object implements javax.persistence.AttributeConverter<URI,String>
JPA converter that store a urn:uuid URI as a UUID string in the database.
  • Constructor Details

    • UrnUuidConverter

      public UrnUuidConverter()
  • Method Details

    • convertToDatabaseColumn

      public String convertToDatabaseColumn(URI urn)
      Specified by:
      convertToDatabaseColumn in interface javax.persistence.AttributeConverter<URI,String>
    • convertToEntityAttribute

      public URI convertToEntityAttribute(String uuid)
      Specified by:
      convertToEntityAttribute in interface javax.persistence.AttributeConverter<URI,String>