Class Hash.Converter

java.lang.Object
tenapull.data.persistence.Hash.Converter
All Implemented Interfaces:
javax.persistence.AttributeConverter<Hash,​byte[]>
Enclosing class:
Hash

public static class Hash.Converter
extends java.lang.Object
implements javax.persistence.AttributeConverter<Hash,​byte[]>
Converts Hash instances back and forth between the database varbinary datatype and the hash fields in the ORM.
  • Constructor Summary

    Constructors 
    Constructor Description
    Converter()  
  • Method Summary

    Modifier and Type Method Description
    byte[] convertToDatabaseColumn​(Hash hash)  
    Hash convertToEntityAttribute​(byte[] bytes)  

    Methods inherited from class java.lang.Object

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

  • Method Details

    • convertToDatabaseColumn

      public byte[] convertToDatabaseColumn​(Hash hash)
      Specified by:
      convertToDatabaseColumn in interface javax.persistence.AttributeConverter<Hash,​byte[]>
    • convertToEntityAttribute

      public Hash convertToEntityAttribute​(byte[] bytes)
      Specified by:
      convertToEntityAttribute in interface javax.persistence.AttributeConverter<Hash,​byte[]>