title: How would I make a ProtobufEnum attribute converter?
body: <p>I am trying to find a common way to store the that are generated by protobuf to an Attribute Converter.</p>
  <p>Here's what I started with</p>
  <pre><code>package com.devhaus.als.portfolio.domain;
  
  import com.fasterxml.jackson.annotation.JsonProperty;
  import com.google.protobuf.ProtocolMessageEnum;
  import lombok.Getter;
  import org.jetbrains.annotations.Contract;
  import org.springframework.stereotype.Component;
  
  import javax.persistence.AttributeConverter;
  import javax.persistence.Converter;
  
  @Component
  @Converter(autoApply = true)
  public class ProtobufEnumConverter implements AttributeConverter&lt;ProtocolMessageEnum, String&gt; {
  
      @Override
      public String convertToDatabaseColumn(final ProtocolMessageEnum attribute) {
  
          // I would've prefered string, but it may be more difficult.
          return attribute.getDescriptorForType().getName() + &quot;/&quot; + attribute.getNumber();
      }
  
      @Override
      public ProtocolMessageEnum convertToEntityAttribute(final String dbData) {
  
          // HOW!?!
          return null;
      }
  }
  </code></pre>