feat(exceptions): implement examples of checked and unchecked exception handling
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
package org.exceptions;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class UserEntity {
|
||||
|
||||
private String firstName;
|
||||
private String lastName;
|
||||
private Long nationalCode;
|
||||
private String email;
|
||||
private Long phoneNumber;
|
||||
private Date dateOfBirth;
|
||||
|
||||
|
||||
public UserEntity(String firstName, String lastName, Long nationalCode, String email, Long phoneNumber, Date dateOfBirth) {
|
||||
this.firstName = firstName;
|
||||
this.lastName = lastName;
|
||||
this.nationalCode = nationalCode;
|
||||
this.email = email;
|
||||
this.phoneNumber = phoneNumber;
|
||||
this.dateOfBirth = dateOfBirth;
|
||||
}
|
||||
|
||||
|
||||
public String getFirstName() {
|
||||
return firstName;
|
||||
}
|
||||
|
||||
public void setFirstName(String firstName) {
|
||||
this.firstName = firstName;
|
||||
}
|
||||
|
||||
public String getLastName() {
|
||||
return lastName;
|
||||
}
|
||||
|
||||
public void setLastName(String lastName) {
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
public Long getNationalCode() {
|
||||
return nationalCode;
|
||||
}
|
||||
|
||||
public void setNationalCode(Long nationalCode) {
|
||||
this.nationalCode = nationalCode;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public Long getPhoneNumber() {
|
||||
return phoneNumber;
|
||||
}
|
||||
|
||||
public void setPhoneNumber(Long phoneNumber) {
|
||||
this.phoneNumber = phoneNumber;
|
||||
}
|
||||
|
||||
public Date getDateOfBirth() {
|
||||
return dateOfBirth;
|
||||
}
|
||||
|
||||
public void setDateOfBirth(Date dateOfBirth) {
|
||||
this.dateOfBirth = dateOfBirth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "UserEntity{" +
|
||||
"firstName='" + firstName + '\'' +
|
||||
", lastName='" + lastName + '\'' +
|
||||
", nationalCode=" + nationalCode +
|
||||
", email='" + email + '\'' +
|
||||
", phoneNumber=" + phoneNumber +
|
||||
", dateOfBirth=" + dateOfBirth +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user