/**
* Getter for employee's branch office
* <p>
- * @return Employable's branch office
+ * @return Employee's branch office
*/
BranchOffice getEmployeeBranchOffice ();
/**
* Setter for employee's branch office
* <p>
- * @param employeeBranchOffice Employable's branch office
+ * @param employeeBranchOffice Employee's branch office
*/
void setEmployeeBranchOffice (final BranchOffice employeeBranchOffice);
/**
* Getter for employee's department
* <p>
- * @return Employable's department
+ * @return Employee's department
*/
Department getEmployeeDepartment ();
/**
* Setter for employee's department
* <p>
- * @param employeeDepartment Employable's department
+ * @param employeeDepartment Employee's department
*/
void setEmployeeDepartment (final Department employeeDepartment);
/**
* Getter for employee's head quarters
* <p>
- * @return Employable's head quarters
+ * @return Employee's head quarters
*/
Headquarter getEmployeeHeadquarter ();
/**
* Getter for employee's head quarters
* <p>
- * @param employeeHeadquarter Employable's head quarters
+ * @param employeeHeadquarter Employee's head quarters
*/
void setEmployeeHeadquarter (final Headquarter employeeHeadquarter);
/**
* Getter for employee's email address
* <p>
- * @return Employable's email address
+ * @return Employee's email address
*/
String getEmployeeEmailAddress ();
/**
* Setter for employee's email address
* <p>
- * @param employeeEmailAddress Employable's email address
+ * @param employeeEmailAddress Employee's email address
*/
void setEmployeeEmailAddress (final String employeeEmailAddress);
/**
* Getter for employee's id number
* <p>
- * @return Employable's id number
+ * @return Employee's id number
*/
Long getEmployeeId ();
/**
* Setter for employee's id number
* <p>
- * @param employeeId Employable's id number
+ * @param employeeId Employee's id number
*/
void setEmployeeId (final Long employeeId);
/**
* Getter for employee's mobile number
* <p>
- * @return Employable's mobile number
+ * @return Employee's mobile number
*/
DialableMobileNumber getEmployeeMobileNumber ();
/**
* Setter for employee's mobile number
* <p>
- * @param employeeMobileNumber Employable's mobile number
+ * @param employeeMobileNumber Employee's mobile number
*/
void setEmployeeMobileNumber (final DialableMobileNumber employeeMobileNumber);
/**
* Getter for employee's number
* <p>
- * @return Employable's number
+ * @return Employee's number
*/
String getEmployeeNumber ();
/**
* Setter for employee's number
* <p>
- * @param employeeNumber Employable's number
+ * @param employeeNumber Employee's number
*/
void setEmployeeNumber (final String employeeNumber);
/**
* Getter for employee's personal data
* <p>
- * @return Employable's personal data
+ * @return Employee's personal data
*/
Contact getEmployeePersonalData ();
/**
* Setter for employee's personal data
* <p>
- * @param employeePersonalData Employable's personal data
+ * @param employeePersonalData Employee's personal data
*/
void setEmployeePersonalData (final Contact employeePersonalData);
/**
* Getter for employee's phone number/extension
* <p>
- * @return Employable's phone number/extension
+ * @return Employee's phone number/extension
*/
Integer getEmployeePhoneExtension ();
/**
* Setter for employee's phone number/extension
* <p>
- * @param employeePhoneExtension Employable's phone number/extension
+ * @param employeePhoneExtension Employee's phone number/extension
*/
void setEmployeePhoneExtension (final Integer employeePhoneExtension);
/**
* Getter for employee's position
* <p>
- * @return Employable's position
+ * @return Employee's position
*/
HireableJobPosition getEmployeeJobPosition ();
/**
* Setter for employee's position
* <p>
- * @param employeePosition Employable's position
+ * @param employeePosition Employee's position
*/
void setEmployeeJobPosition (final HireableJobPosition employeePosition);
@Temporal (TemporalType.TIME)
private Date openingEndTime;
- /**
- * Id number
- */
- @Id
- @Column (name = "opening_times_id", nullable = false, updatable = false)
- @GeneratedValue (strategy = GenerationType.IDENTITY)
- private Long openingId;
-
/**
* Starting day of opening times
*/
@Temporal (TemporalType.TIME)
private Date openingStartTime;
+ /**
+ * Id number
+ */
+ @Id
+ @Column (name = "opening_times_id", nullable = false, updatable = false)
+ @GeneratedValue (strategy = GenerationType.IDENTITY)
+ private Long openingTimeId;
+
/**
* Default constructor
*/
* @param openingStartTime Start time
*/
public BusinessOpeningTime (final DayOfTheWeek openingEndDay, final Date openingEndTime, final DayOfTheWeek openingStartDay, final Date openingStartTime) {
+ // Invoke default constructor
+ this();
+
+ // Validate parameter
+ if (null == openingEndDay) {
+ // Throw NPE
+ throw new NullPointerException("openingEndDay is null"); //NOI18N
+ } else if (null == openingEndTime) {
+ // Throw NPE
+ throw new NullPointerException("openingEndTime is null"); //NOI18N
+ } else if (null == openingStartDay) {
+ // Throw NPE
+ throw new NullPointerException("openingStartDay is null"); //NOI18N
+ } else if (null == openingStartTime) {
+ // Throw NPE
+ throw new NullPointerException("openingStartTime is null"); //NOI18N
+ }
+
// Set all fields
this.openingEndDay = openingEndDay;
this.openingEndTime = openingEndTime;
final OpeningTime openingTimes = (OpeningTime) obj;
- if (!Objects.equals(this.getOpeningId(), openingTimes.getOpeningId())) {
+ if (!Objects.equals(this.getOpeningTimeId(), openingTimes.getOpeningTimeId())) {
return false;
} else if (this.getOpeningStartDay() != openingTimes.getOpeningStartDay()) {
return false;
this.openingEndTime = openingEndTime;
}
- @Override
- public Long getOpeningId () {
- return this.openingId;
- }
-
- @Override
- public void setOpeningId (final Long openingId) {
- this.openingId = openingId;
- }
-
@Override
public DayOfTheWeek getOpeningStartDay () {
return this.openingStartDay;
this.openingStartTime = openingStartTime;
}
+ @Override
+ public Long getOpeningTimeId () {
+ return this.openingTimeId;
+ }
+
+ @Override
+ public void setOpeningTimeId (final Long openingTimeId) {
+ this.openingTimeId = openingTimeId;
+ }
+
@Override
public int hashCode () {
int hash = 7;
- hash = 97 * hash + Objects.hashCode(this.getOpeningId());
+ hash = 97 * hash + Objects.hashCode(this.getOpeningTimeId());
hash = 97 * hash + Objects.hashCode(this.getOpeningStartDay());
hash = 97 * hash + Objects.hashCode(this.getOpeningEndDay());
hash = 97 * hash + Objects.hashCode(this.getOpeningStartTime());