Professional Documents
Culture Documents
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Employee() {
this.name = name;
this.salary = salary;
return id;
}
public void setId(Long id) {
this.id = id;
return name;
this.name = name;
return salary;
this.salary = salary;
Employee HQL
import javax.persistence.*;
import java.util.List;
this.entityManager = entityManager;
EntityManagerFactory entityManagerFactory =
Persistence.createEntityManagerFactory("EmployeePU");
entityManager.close();
entityManagerFactory.close();