Class UpperCaseAttributeConverter

  • All Implemented Interfaces:
    javax.persistence.AttributeConverter<String,​String>

    public class UpperCaseAttributeConverter
    extends Object
    implements javax.persistence.AttributeConverter<String,​String>
    An AttributeConverter that converters the input string to upper-case at persistence time and returns the database value as-is when hydrated from the persistence store.
    Author:
    Chris Cranford
    • Constructor Detail

      • UpperCaseAttributeConverter

        public UpperCaseAttributeConverter()
    • Method Detail

      • convertToDatabaseColumn

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

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