Class UuidConverter

java.lang.Object
org.minijax.dao.converters.UuidConverter
All Implemented Interfaces:
jakarta.persistence.AttributeConverter<java.util.UUID,​byte[]>

public class UuidConverter
extends java.lang.Object
implements jakarta.persistence.AttributeConverter<java.util.UUID,​byte[]>
The UuidConverter class implements the JPA converter from UUID to byte array.
  • Constructor Summary

    Constructors
    Constructor Description
    UuidConverter()  
  • Method Summary

    Modifier and Type Method Description
    byte[] convertToDatabaseColumn​(java.util.UUID uuid)  
    java.util.UUID convertToEntityAttribute​(byte[] bytes)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • UuidConverter

      public UuidConverter()
  • Method Details

    • convertToDatabaseColumn

      public byte[] convertToDatabaseColumn​(java.util.UUID uuid)
      Specified by:
      convertToDatabaseColumn in interface jakarta.persistence.AttributeConverter<java.util.UUID,​byte[]>
    • convertToEntityAttribute

      public java.util.UUID convertToEntityAttribute​(byte[] bytes)
      Specified by:
      convertToEntityAttribute in interface jakarta.persistence.AttributeConverter<java.util.UUID,​byte[]>