forked from lucafon/hbase-object-mapper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEmployee.java
48 lines (37 loc) · 1.02 KB
/
Employee.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.flipkart.hbaseobjectmapper.testcases.entities;
import com.flipkart.hbaseobjectmapper.*;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@SuppressWarnings("unused")
@ToString
@EqualsAndHashCode
@HBTable(name = "employees", families = {@Family(name = "a")})
public class Employee implements HBRecord<Long> {
@HBRowKey
private Long empid;
@HBColumn(family = "a", column = "name")
private String empName;
@HBColumn(family = "a", column = "reportee_count")
private Short reporteeCount;
@Override
public Long composeRowKey() {
return empid;
}
@Override
public void parseRowKey(Long rowKey) {
empid = rowKey;
}
public Long getEmpid() {
return empid;
}
public Short getReporteeCount() {
return reporteeCount;
}
public Employee() {
}
public Employee(Long empid, String empName, Short reporteeCount) {
this.empid = empid;
this.empName = empName;
this.reporteeCount = reporteeCount;
}
}