title: How to get the column Name String of an Entity class in Java/Hibernate
body: <p>I have a Entity Class:</p>
  
  <pre><code>    @Entity
      @Table(name = "MyTasks", uniqueConstraints = {
      @UniqueConstraint(columnNames = {"id"})
      public class MyTasks {
        @Id
        @Column(name = "id")
        private Integer id;
  
        @Column(name = "task_name")
        private String task_name;
  
        @Column(name = "task_data")
        private String task_data;
      }
  </code></pre>
  
  <p>Say, I have an instance of an entity by calling new MyTasks();
  How can I get all the Column Names of this entity class, say in an array String[]?</p>