/*
- * Copyright (C) 2015 Roland Haeder
+ * Copyright (C) 2016 Roland Haeder
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*/
package org.mxchange.jcontactsbusiness.jobposition;
+import java.util.Calendar;
+import java.util.Objects;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
/**
* A POJO for job positions
* <p>
* @author Roland Haeder
*/
-@Entity (name = "job_positions")
-@Table (name = "job_positions")
+@Entity (name = "company_job_positions")
+@Table (name = "company_job_positions")
public class EmployeePosition implements JobPosition, Comparable<JobPosition> {
/**
*/
private static final long serialVersionUID = 18_427_587_187_609L;
+ /**
+ * Timestamp when this entry has been created
+ */
+ @Basic (optional = false)
+ @Temporal (TemporalType.TIMESTAMP)
+ @Column (name = "job_position_created", nullable = false, updatable = false)
+ private Calendar jobPositionCreated;
+
/**
* Id number
*/
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
+ @Override
+ public boolean equals (final Object object) {
+ if (object == null) {
+ return false;
+ } else if (this.getClass() != object.getClass()) {
+ return false;
+ }
+
+ final JobPosition other = (JobPosition) object;
+
+ return Objects.equals(this.getJobPositionName(), other.getJobPositionName());
+ }
+
+ @Override
+ public int hashCode () {
+ int hash = 7;
+ hash = 37 * hash + Objects.hashCode(this.getJobPositionName());
+ return hash;
+ }
+
+ @Override
+ public Calendar getJobPositionCreated () {
+ return this.jobPositionCreated;
+ }
+
+ @Override
+ public void setJobPositionCreated (final Calendar jobPositionCreated) {
+ this.jobPositionCreated = jobPositionCreated;
+ }
+
@Override
public Long getJobPositionId () {
return this.jobPositionId;