emr_demo
@ 4
emr_demo / web_emr - Copy / src / main / java / com / bestray / model / entity / SpecialityMaster.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 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 |
package com.bestray.model.entity; import java.io.Serializable; import java.util.Date; import java.util.Set; import java.util.UUID; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.Version; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import com.fasterxml.jackson.annotation.JsonIgnore; @Entity @Table(name="speciality_master") public class SpecialityMaster implements Serializable{ @Id @Column(name = "ID") //@GeneratedValue(strategy = GenerationType.AUTO) // @SequenceGenerator(name = "user_seq", sequenceName = "user_seq", allocationSize = 1) @JsonIgnore private String id=UUID.randomUUID().toString().toUpperCase(); @Column(name = "NAME", length = 50) private String specialityName; @Column(name = "ENABLED") @NotNull private Boolean enabled; public Boolean getEnabled() { return enabled; } public void setEnabled(Boolean enabled) { this.enabled = enabled; } @OneToMany(mappedBy="specialityId") private Set<DepartmentMaster> departmentSpeciality; public Set<DepartmentMaster> getDepartmentSpeciality() { return departmentSpeciality; } public void setDepartmentSpeciality(Set<DepartmentMaster> departmentSpeciality) { this.departmentSpeciality = departmentSpeciality; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getSpecialityName() { return specialityName; } public void setSpecialityName(String specialityName) { this.specialityName = specialityName; } } |