-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPersonal.java
More file actions
106 lines (70 loc) · 2.18 KB
/
Personal.java
File metadata and controls
106 lines (70 loc) · 2.18 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
package models;
import java.util.Date;
import java.util.List;
import javax.persistence.Id;
import play.data.validation.Constraints.Required;
import play.db.ebean.Model;
public class Personal extends Model{
@Id
public Long id;
@Required
public Long rollNumber;
@Required
public String name;
@Required
public String fatherName;
@Required
public int nationalIdCardNumber;
public String familyName;
public String grandFathername;
public String occuption;
public Date dateOfBirth;
public String address, email;
public int telephoneNumber, age , emergencyNumber;
public int salary;
public boolean isPercentage, notPercentage, both;
public int percentage;
public boolean isready;
public String info;
public static Finder<Long, Personal> find = new Finder<Long, Personal>(Long.class, Personal.class);
public Personal(){
}
public Personal(String name, String fatherName, String grandFatherName, int age, Date dateOfBirth, String email, String address, int telephoneNumber, int emergencyNumber, int salary, boolean isPercentage, boolean notPercentage, boolean both, int percentage, boolean isReady, String info){
this.name = name;
this.fatherName = fatherName;
this.grandFathername = grandFatherName;
this.age = age;
this.dateOfBirth = dateOfBirth;
this.email = email;
this.address = address;
this.telephoneNumber = telephoneNumber;
this.emergencyNumber = emergencyNumber;
this.isready = isready;
this.occuption = occuption;
this.familyName = familyName;
this.salary = salary;
this.both = both;
this.isPercentage = isPercentage;
this.notPercentage = notPercentage;
this.rollNumber = rollNumber;
this.nationalIdCardNumber = nationalIdCardNumber;
this.occuption = occuption;
isBoth();
}
public boolean isBoth(){
if(both==true){
isPercentage = true;
notPercentage = true;
}
return both;
}
public static List<Personal> all(){
return find.all();
}
public static void delete(Long id){
find.ref(id).delete();
}
public static void create(Personal personal){
personal.save();
}
}