Package org.minijax.dao.converters
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.UUIDconvertToEntityAttribute(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:
convertToDatabaseColumnin interfacejakarta.persistence.AttributeConverter<java.util.UUID,byte[]>
-
convertToEntityAttribute
public java.util.UUID convertToEntityAttribute(byte[] bytes)- Specified by:
convertToEntityAttributein interfacejakarta.persistence.AttributeConverter<java.util.UUID,byte[]>
-