Assigned Id

Useful for natural ids or in case you have your own strategy to create a unique id:

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.Id;
@Entity
public class Lion implements Serializable {
    @Id
    private Integer id;

Same as XML mapping:

   <class name="Lion" table="lion">
      <id name="id">
         <generator class="assigned"></generator>
      </id>
....... snip .......