|
| 1 | +package ca.bc.gov.educ.studentdatacollection.api.model.v1; |
| 2 | + |
| 3 | +import ca.bc.gov.educ.studentdatacollection.api.util.UpperCase; |
| 4 | +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| 5 | +import jakarta.persistence.CascadeType; |
| 6 | +import jakarta.persistence.Table; |
| 7 | +import jakarta.persistence.*; |
| 8 | +import jakarta.validation.constraints.PastOrPresent; |
| 9 | +import lombok.*; |
| 10 | +import org.hibernate.annotations.Parameter; |
| 11 | +import org.hibernate.annotations.*; |
| 12 | + |
| 13 | +import java.math.BigDecimal; |
| 14 | +import java.time.LocalDateTime; |
| 15 | +import java.util.Set; |
| 16 | +import java.util.UUID; |
| 17 | + |
| 18 | +@Data |
| 19 | +@NoArgsConstructor |
| 20 | +@AllArgsConstructor |
| 21 | +@DynamicUpdate |
| 22 | +@Entity |
| 23 | +@Table(name = "SDC_SCHOOL_COLLECTION_STUDENT") |
| 24 | +@JsonIgnoreProperties(ignoreUnknown = true) |
| 25 | +public class SdcSchoolCollectionStudentLightWithEnrolledProgramCodesEntity { |
| 26 | + |
| 27 | + @Id |
| 28 | + @GeneratedValue(generator = "UUID") |
| 29 | + @GenericGenerator(name = "UUID", strategy = "org.hibernate.id.UUIDGenerator", parameters = { |
| 30 | + @Parameter(name = "uuid_gen_strategy_class", value = "org.hibernate.id.uuid.CustomVersionOneStrategy")}) |
| 31 | + @Column(name = "SDC_SCHOOL_COLLECTION_STUDENT_ID", unique = true, updatable = false, columnDefinition = "BINARY(16)") |
| 32 | + UUID sdcSchoolCollectionStudentID; |
| 33 | + |
| 34 | + @Column(name = "SDC_SCHOOL_COLLECTION_ID") |
| 35 | + private UUID sdcSchoolCollectionID; |
| 36 | + |
| 37 | + @Column(name = "LOCAL_ID") |
| 38 | + private String localID; |
| 39 | + |
| 40 | + @Column(name = "STUDENT_PEN") |
| 41 | + private String studentPen; |
| 42 | + |
| 43 | + @Column(name = "LEGAL_FIRST_NAME") |
| 44 | + @UpperCase |
| 45 | + private String legalFirstName; |
| 46 | + |
| 47 | + @Column(name = "LEGAL_MIDDLE_NAMES") |
| 48 | + @UpperCase |
| 49 | + private String legalMiddleNames; |
| 50 | + |
| 51 | + @Column(name = "LEGAL_LAST_NAME") |
| 52 | + @UpperCase |
| 53 | + private String legalLastName; |
| 54 | + |
| 55 | + @Column(name = "USUAL_FIRST_NAME") |
| 56 | + @UpperCase |
| 57 | + private String usualFirstName; |
| 58 | + |
| 59 | + @Column(name = "USUAL_MIDDLE_NAMES") |
| 60 | + @UpperCase |
| 61 | + private String usualMiddleNames; |
| 62 | + |
| 63 | + @Column(name = "USUAL_LAST_NAME") |
| 64 | + @UpperCase |
| 65 | + private String usualLastName; |
| 66 | + |
| 67 | + @Column(name = "DOB") |
| 68 | + private String dob; |
| 69 | + |
| 70 | + @Column(name = "GENDER_CODE", length = 1) |
| 71 | + private String gender; |
| 72 | + |
| 73 | + @Column(name = "SPECIAL_EDUCATION_CATEGORY_CODE") |
| 74 | + private String specialEducationCategoryCode; |
| 75 | + |
| 76 | + @Column(name = "SCHOOL_FUNDING_CODE") |
| 77 | + private String schoolFundingCode; |
| 78 | + |
| 79 | + @Column(name = "NATIVE_ANCESTRY_IND") |
| 80 | + private String nativeAncestryInd; |
| 81 | + |
| 82 | + @Column(name = "HOME_LANGUAGE_SPOKEN_CODE") |
| 83 | + private String homeLanguageSpokenCode; |
| 84 | + |
| 85 | + @Column(name = "OTHER_COURSES") |
| 86 | + private String otherCourses; |
| 87 | + |
| 88 | + @Column(name = "SUPPORT_BLOCKS") |
| 89 | + private String supportBlocks; |
| 90 | + |
| 91 | + @Column(name = "ENROLLED_GRADE_CODE") |
| 92 | + private String enrolledGradeCode; |
| 93 | + |
| 94 | + @Column(name = "ENROLLED_PROGRAM_CODES") |
| 95 | + private String enrolledProgramCodes; |
| 96 | + |
| 97 | + @Column(name = "CAREER_PROGRAM_CODE") |
| 98 | + private String careerProgramCode; |
| 99 | + |
| 100 | + @Column(name = "NUMBER_OF_COURSES") |
| 101 | + private String numberOfCourses; |
| 102 | + |
| 103 | + @Column(name= "NUMBER_OF_COURSES_DEC") |
| 104 | + private BigDecimal numberOfCoursesDec; |
| 105 | + |
| 106 | + @Column(name = "BAND_CODE") |
| 107 | + private String bandCode; |
| 108 | + |
| 109 | + @Column(name = "POSTAL_CODE") |
| 110 | + @UpperCase |
| 111 | + private String postalCode; |
| 112 | + |
| 113 | + @Column(name = "SDC_SCHOOL_COLLECTION_STUDENT_STATUS_CODE") |
| 114 | + private String sdcSchoolCollectionStudentStatusCode; |
| 115 | + |
| 116 | + @Column(name = "IS_ADULT") |
| 117 | + private Boolean isAdult; |
| 118 | + |
| 119 | + @Column(name = "IS_SCHOOL_AGED") |
| 120 | + private Boolean isSchoolAged; |
| 121 | + |
| 122 | + @Column(name = "FTE") |
| 123 | + private BigDecimal fte; |
| 124 | + |
| 125 | + @Column(name = "FTE_ZERO_REASON_CODE", length = 10) |
| 126 | + private String fteZeroReasonCode; |
| 127 | + |
| 128 | + @Column(name = "FRENCH_PROGRAM_NON_ELIG_REASON_CODE", length = 10) |
| 129 | + private String frenchProgramNonEligReasonCode; |
| 130 | + |
| 131 | + @Column(name = "ELL_NON_ELIG_REASON_CODE", length = 10) |
| 132 | + private String ellNonEligReasonCode; |
| 133 | + |
| 134 | + @Column(name = "INDIGENOUS_SUPPORT_PROGRAM_NON_ELIG_REASON_CODE", length = 10) |
| 135 | + private String indigenousSupportProgramNonEligReasonCode; |
| 136 | + |
| 137 | + @Column(name = "CAREER_PROGRAM_NON_ELIG_REASON_CODE", length = 10) |
| 138 | + private String careerProgramNonEligReasonCode; |
| 139 | + |
| 140 | + @Column(name = "SPECIAL_EDUCATION_NON_ELIG_REASON_CODE", length = 10) |
| 141 | + private String specialEducationNonEligReasonCode; |
| 142 | + |
| 143 | + @Column(name = "IS_GRADUATED") |
| 144 | + private Boolean isGraduated; |
| 145 | + |
| 146 | + @Column(name = "ASSIGNED_PEN") |
| 147 | + private String assignedPen; |
| 148 | + |
| 149 | + @Column(name = "ASSIGNED_STUDENT_ID") |
| 150 | + private UUID assignedStudentId; |
| 151 | + |
| 152 | + @Column(name = "YEARS_IN_ELL") |
| 153 | + private Integer yearsInEll; |
| 154 | + |
| 155 | + @Column(name = "ORIGINAL_DEMOG_HASH") |
| 156 | + private String originalDemogHash; |
| 157 | + |
| 158 | + @Column(name = "CURRENT_DEMOG_HASH") |
| 159 | + private String currentDemogHash; |
| 160 | + |
| 161 | + @Column(name = "CREATE_USER", updatable = false , length = 32) |
| 162 | + private String createUser; |
| 163 | + |
| 164 | + @PastOrPresent |
| 165 | + @Column(name = "CREATE_DATE", updatable = false) |
| 166 | + private LocalDateTime createDate; |
| 167 | + |
| 168 | + @Column(name = "UPDATE_USER", length = 32) |
| 169 | + private String updateUser; |
| 170 | + |
| 171 | + @PastOrPresent |
| 172 | + @Column(name = "UPDATE_DATE") |
| 173 | + private LocalDateTime updateDate; |
| 174 | + |
| 175 | + @ManyToOne |
| 176 | + @NotFound(action = NotFoundAction.IGNORE) |
| 177 | + @JoinColumn(name = "SDC_SCHOOL_COLLECTION_ID", insertable = false, updatable = false) |
| 178 | + SdcSchoolCollectionEntity sdcSchoolCollectionEntity; |
| 179 | + |
| 180 | + @EqualsAndHashCode.Exclude |
| 181 | + @ToString.Exclude |
| 182 | + @OneToMany(mappedBy = "sdcSchoolCollectionStudentEntity", fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true, targetEntity = SdcSchoolCollectionStudentEnrolledProgramEntity.class) |
| 183 | + Set<SdcSchoolCollectionStudentEnrolledProgramEntity> sdcStudentEnrolledProgramEntities; |
| 184 | + |
| 185 | + public UUID getSdcSchoolCollectionEntitySchoolID() { |
| 186 | + return this.sdcSchoolCollectionEntity != null ? this.sdcSchoolCollectionEntity.getSchoolID() : null; |
| 187 | + } |
| 188 | +} |
0 commit comments