Database Reference
In-Depth Information
The following code shows the implementation of an employee entity
as Employee.java :
@Entity
@Table(name = "EMPLOYEE")
public class Employee {
@Id
private String employeeId;
@Column
private String employeeName;
@Column
private String address;
@Column
private String department;
public Employee() {
// Default constructor.
}
// getters and setters.
}
Once the employee entity is created, implement the create, read, update and
delete ( CRUD ) operations to be performed:
private static EntityManagerFactory emf = Persistence
.createEntityManagerFactory("hbaseTest");
private static EntityManager em = emf.createEntityManager();
 
Search WWH ::




Custom Search