title: AttributeConverter Date String
body: <p>Is it possible to create <code>AttributeConverter&lt;Date,String&gt;</code>? I want to use it in a Spring project with Hibernate.
  I want to convert <code>String</code> dataColumn to <code>Date</code> entity attribute.
  Please help me.
  It is well placed in package than is scanned by hibernate</p>
  
  <pre><code>@Converter(autoApply=true)
  public class DatetoStringConverter implements AttributeConverter
  {
      @Override
      public String convertToDatabaseColumn(Date arg0) {
          SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy",Locale.FRENCH);
          return formatter.format(arg0);
      }
  
      @Override
      public Date convertToEntityAttribute(String arg0) {
          try {
              SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy",Locale.FRENCH);
              return  formatter.parse(arg0);
          } catch (ParseException e) {
              return null;
          }
      }
  }
  </code></pre>
  
  <p>and the field</p>
  
  <pre><code>@Column(name="Date")
  @DateTimeFormat(pattern="dd/MM/yyyy")
  @Convert(converter=DatetoStringConverter.class)
  private Date datefonction;
  </code></pre>