how do i create -.hbm.xml file by looking java bean

i am integrating spring with hibernate;i dont know hibernate;this is my employee class;;by seeing the class how can i create Emplee.hbm.xml file;
here for id i created sequence i.e emp_seq.nextval;

public class Employee implements Serializable {

    private int id;
    private String name;
    private String address;
    private String email;
    private String phone;
      public Employee()
      {
      }

    public Employee(int id,String name,String addr,String email,String phone) {
            this.id=id;
            this.name=name;
            this.address=addr;
            this.email=email;
            this.phone=phone;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

   // @Id (generate = GeneratorType.AUTO)
    public int getId() {
        return id;
    }

  //  @Column (length=100)
    public String getName() {
        return name;
    }

   // @Column (length=100)
    public String getAddress() {
        return address;
    }

  //  @Column (length=30)
    public String getEmail() {
        return email;
    }

   // @Column (length=15)
    public String getPhone() {
        return phone;
    }
      
      public String toString()
      {
            return "emp="+this.id+"...name="+this.name+".addess="+this.address+"...email.."+this.email+"....phone=="+this.phone;
      }

}
LVL 20
chaitu chaituAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mick BarryJava DeveloperCommented:
you need to add xdoclet annotations

http://www.hibernate.org/72.html

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
chaitu chaituAuthor Commented:

using hibernateDAOSupport class  i am retrving emp records

getHibernateTemplate().find(" FROM EMP");


my doubt is where does "select part" will come in the query ??
Mick BarryJava DeveloperCommented:
hows that related to the question?
chaitu chaituAuthor Commented:
anyway i solved that problem i thought u may be knowing that ;



any other approach other tahn xdoclet.
Mick BarryJava DeveloperCommented:
hibernate looks after constructing the query
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.