title: Cassandra Java driver 3 EnumNameCodec
body: <p>I am migrating from Cassandra 2.1 to v3 and so using new Java Driver v3.
  A change has been made about @Enumerated(EnumType.STRING) or ORDINAL which has been swapped by driver-extras module EnumOrdinalCodec and EnumNameCodec.</p>
  
  <p>In my project I have it:</p>
  
  <pre><code>@Column(name = "myColumn")
      @Enumerated(EnumType.STRING)
      private myEnum         currentMyEnum         ;
  </code></pre>
  
  <p>I look up for some example about how to use them but did not really understand how they work.
  The main info I found was that example:</p>
  
  <pre><code>enum Foo {...}
  enum Bar {...}
  
  // register the appropriate codecs
  CodecRegistry.DEFAULT_INSTANCE
      .register(new EnumOrdinalCodec&lt;Foo&gt;(Foo.class))
      .register(new EnumNameCodec&lt;Bar&gt;(Bar.class))
  
  // the following mappings are handled out-of-the-box
  @Table
  public class MyPojo {
      private Foo foo;
      private List&lt;Bar&gt; bars;
      ...
  }
  </code></pre>
  
  <p>Which is not clear to me. It looks they put enum, codecs and DAO model in the same file. Within my project the enum and DAO model are in file different and when I try to put the "CodecRegistry.DEFAULT_INSTANCE.register(new EnumOrdinalCodec(myEnum.class))" in etheir the enum or DAO file I get error from IDE Eclipse.</p>
  
  <p>If some one could help me about how to chnage @Enumerated(EnumType.STRING) to use EnumNameCodec thanks in advance.</p>