From 569b8f67ac325847c726136b3b117d1d5a6cd8e4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 10 Oct 2019 01:54:28 +0200 Subject: [PATCH] Don't cherry-pick: - renamed double JobPosition (here) to OpenJobPosition to have it no longer ambicous - changed from java.util.Calendar (very old) to java.util.Date (latest) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../jobposition/HireableJobPosition.java | 18 ++++---- ...{JobPosition.java => OpenJobPosition.java} | 41 ++++++++++--------- .../model/jobskill/JobPositionSkill.java | 14 +++---- .../model/jobskill/SkillableJobPosition.java | 10 ++--- .../mxchange/jjobs/model/skill/JobSkill.java | 20 ++++----- .../mxchange/jjobs/model/skill/Skillable.java | 14 +++---- .../model/user/skills/SkillableUser.java | 10 ++--- .../jjobs/model/user/skills/UserSkill.java | 14 +++---- 8 files changed, 71 insertions(+), 70 deletions(-) rename src/org/mxchange/jjobs/model/jobposition/{JobPosition.java => OpenJobPosition.java} (86%) diff --git a/src/org/mxchange/jjobs/model/jobposition/HireableJobPosition.java b/src/org/mxchange/jjobs/model/jobposition/HireableJobPosition.java index 120cf99..dbbf59a 100644 --- a/src/org/mxchange/jjobs/model/jobposition/HireableJobPosition.java +++ b/src/org/mxchange/jjobs/model/jobposition/HireableJobPosition.java @@ -16,7 +16,7 @@ */ package org.mxchange.jjobs.model.jobposition; -import java.util.Calendar; +import java.util.Date; import org.mxchange.jcontactsbusiness.model.jobposition.JobPosition; import org.mxchange.jjobs.model.jobposition.status.JobPositionStatus; import org.mxchange.jusercore.model.user.User; @@ -33,14 +33,14 @@ public interface HireableJobPosition extends JobPosition { *

* @return Job position start */ - Calendar getJobPositionStart (); + Date getJobPositionStart (); /** * Setter for job position start *

* @param jobPositionStart Job position start */ - void setJobPositionStart (final Calendar jobPositionStart); + void setJobPositionStart (final Date jobPositionStart); /** * Getter for job position status @@ -61,42 +61,42 @@ public interface HireableJobPosition extends JobPosition { *

* @return When this job position was deleted by user */ - Calendar getJobPositionDeleted (); + Date getJobPositionDeleted (); /** * Setter for when this job position was deleted by user *

* @param jobPositionDeleted When this job position was deleted by user */ - void setJobPositionDeleted (final Calendar jobPositionDeleted); + void setJobPositionDeleted (final Date jobPositionDeleted); /** * Getter for when this job position has expired *

* @return When this job position has expired */ - Calendar getJobPositionExpired (); + Date getJobPositionExpired (); /** * Setter for when this job position has expired *

* @param jobPositionExpired When this job position has expired */ - void setJobPositionExpired (final Calendar jobPositionExpired); + void setJobPositionExpired (final Date jobPositionExpired); /** * Getter for when employee was hired for this job position *

* @return When employee was hired for this job position */ - Calendar getJobPositionHired (); + Date getJobPositionHired (); /** * Setter for when employee was hired for this job position *

* @param jobPositionHired When employee was hired for this job position */ - void setJobPositionHired (final Calendar jobPositionHired); + void setJobPositionHired (final Date jobPositionHired); /** * Getter for user who added this job position diff --git a/src/org/mxchange/jjobs/model/jobposition/JobPosition.java b/src/org/mxchange/jjobs/model/jobposition/OpenJobPosition.java similarity index 86% rename from src/org/mxchange/jjobs/model/jobposition/JobPosition.java rename to src/org/mxchange/jjobs/model/jobposition/OpenJobPosition.java index 5593025..4df42d3 100644 --- a/src/org/mxchange/jjobs/model/jobposition/JobPosition.java +++ b/src/org/mxchange/jjobs/model/jobposition/OpenJobPosition.java @@ -16,7 +16,7 @@ */ package org.mxchange.jjobs.model.jobposition; -import java.util.Calendar; +import java.util.Date; import java.util.Objects; import javax.persistence.Basic; import javax.persistence.CascadeType; @@ -39,6 +39,7 @@ import org.mxchange.jusercore.model.user.User; /** * A POJO entity for job positions + * @todo Check if required fields are given and write both constructors (public) *

* @author Roland Häder */ @@ -47,7 +48,7 @@ import org.mxchange.jusercore.model.user.User; name = "open_job_position" ) @SuppressWarnings ("PersistenceUnitPresent") -public class JobPosition implements HireableJobPosition { +public class OpenJobPosition implements HireableJobPosition { /** * Serial number @@ -68,28 +69,28 @@ public class JobPosition implements HireableJobPosition { @Basic (optional = false) @Column (name = "job_position_created", nullable = false, updatable = false) @Temporal (TemporalType.TIMESTAMP) - private Calendar jobPositionCreated; + private Date jobPositionCreated; /** * When this job position (offer) was deleted */ @Column (name = "job_position_deleted") @Temporal (TemporalType.TIMESTAMP) - private Calendar jobPositionDeleted; + private Date jobPositionDeleted; /** * When this job position (offer) has expired */ @Column (name = "job_position_expired") @Temporal (TemporalType.TIMESTAMP) - private Calendar jobPositionExpired; + private Date jobPositionExpired; /** * When a new employed was hired for this job position */ @Column (name = "job_position_hired") @Temporal (TemporalType.TIMESTAMP) - private Calendar jobPositionHired; + private Date jobPositionHired; /** * Id number (primary key) @@ -112,7 +113,7 @@ public class JobPosition implements HireableJobPosition { @Basic (optional = false) @Column (name = "job_position_start", nullable = false) @Temporal (TemporalType.DATE) - private Calendar jobPositionStart; + private Date jobPositionStart; /** * Job position status @@ -127,7 +128,7 @@ public class JobPosition implements HireableJobPosition { */ @Column (name = "job_position_updated", insertable = false) @Temporal (TemporalType.TIMESTAMP) - private Calendar jobPositionUpdated; + private Date jobPositionUpdated; @Override public boolean equals (final Object object) { @@ -162,49 +163,49 @@ public class JobPosition implements HireableJobPosition { @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getJobPositionCreated () { + public Date getJobPositionCreated () { return this.jobPositionCreated; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setJobPositionCreated (final Calendar jobPositionCreated) { + public void setJobPositionCreated (final Date jobPositionCreated) { this.jobPositionCreated = jobPositionCreated; } @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getJobPositionDeleted () { + public Date getJobPositionDeleted () { return this.jobPositionDeleted; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setJobPositionDeleted (final Calendar jobPositionDeleted) { + public void setJobPositionDeleted (final Date jobPositionDeleted) { this.jobPositionDeleted = jobPositionDeleted; } @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getJobPositionExpired () { + public Date getJobPositionExpired () { return this.jobPositionExpired; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setJobPositionExpired (final Calendar jobPositionExpired) { + public void setJobPositionExpired (final Date jobPositionExpired) { this.jobPositionExpired = jobPositionExpired; } @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getJobPositionHired () { + public Date getJobPositionHired () { return this.jobPositionHired; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setJobPositionHired (final Calendar jobPositionHired) { + public void setJobPositionHired (final Date jobPositionHired) { this.jobPositionHired = jobPositionHired; } @@ -230,13 +231,13 @@ public class JobPosition implements HireableJobPosition { @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getJobPositionStart () { + public Date getJobPositionStart () { return this.jobPositionStart; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setJobPositionStart (final Calendar jobPositionStart) { + public void setJobPositionStart (final Date jobPositionStart) { this.jobPositionStart = jobPositionStart; } @@ -252,13 +253,13 @@ public class JobPosition implements HireableJobPosition { @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getJobPositionUpdated () { + public Date getJobPositionUpdated () { return this.jobPositionUpdated; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setJobPositionUpdated (final Calendar jobPositionUpdated) { + public void setJobPositionUpdated (final Date jobPositionUpdated) { this.jobPositionUpdated = jobPositionUpdated; } diff --git a/src/org/mxchange/jjobs/model/jobskill/JobPositionSkill.java b/src/org/mxchange/jjobs/model/jobskill/JobPositionSkill.java index 67c6050..ec162ae 100644 --- a/src/org/mxchange/jjobs/model/jobskill/JobPositionSkill.java +++ b/src/org/mxchange/jjobs/model/jobskill/JobPositionSkill.java @@ -16,7 +16,7 @@ */ package org.mxchange.jjobs.model.jobskill; -import java.util.Calendar; +import java.util.Date; import java.util.Objects; import javax.persistence.Basic; import javax.persistence.CascadeType; @@ -70,7 +70,7 @@ public class JobPositionSkill implements SkillableJobPosition { @Basic (optional = false) @Column (name = "skill_job_created", nullable = false, updatable = false) @Temporal (TemporalType.TIMESTAMP) - private Calendar jobPositionSkillCreated; + private Date jobPositionSkillCreated; /** * Id number (primary key @@ -85,7 +85,7 @@ public class JobPositionSkill implements SkillableJobPosition { */ @Column (name = "skill_job_updated", insertable = false) @Temporal (TemporalType.TIMESTAMP) - private Calendar jobPositionSkillUpdated; + private Date jobPositionSkillUpdated; /** * Link to skill entity @@ -142,13 +142,13 @@ public class JobPositionSkill implements SkillableJobPosition { @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getJobPositionSkillCreated () { + public Date getJobPositionSkillCreated () { return this.jobPositionSkillCreated; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setJobPositionSkillCreated (final Calendar jobPositionSkillCreated) { + public void setJobPositionSkillCreated (final Date jobPositionSkillCreated) { this.jobPositionSkillCreated = jobPositionSkillCreated; } @@ -164,13 +164,13 @@ public class JobPositionSkill implements SkillableJobPosition { @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getJobPositionSkillUpdated () { + public Date getJobPositionSkillUpdated () { return this.jobPositionSkillUpdated; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setJobPositionSkillUpdated (final Calendar jobPositionSkillUpdated) { + public void setJobPositionSkillUpdated (final Date jobPositionSkillUpdated) { this.jobPositionSkillUpdated = jobPositionSkillUpdated; } diff --git a/src/org/mxchange/jjobs/model/jobskill/SkillableJobPosition.java b/src/org/mxchange/jjobs/model/jobskill/SkillableJobPosition.java index 1595bf2..47d17bc 100644 --- a/src/org/mxchange/jjobs/model/jobskill/SkillableJobPosition.java +++ b/src/org/mxchange/jjobs/model/jobskill/SkillableJobPosition.java @@ -17,7 +17,7 @@ package org.mxchange.jjobs.model.jobskill; import java.io.Serializable; -import java.util.Calendar; +import java.util.Date; import org.mxchange.jjobs.model.jobposition.HireableJobPosition; import org.mxchange.jjobs.model.skill.Skillable; import org.mxchange.jusercore.model.user.User; @@ -48,28 +48,28 @@ public interface SkillableJobPosition extends Serializable { *

* @return Job position skill created timestamp */ - Calendar getJobPositionSkillCreated (); + Date getJobPositionSkillCreated (); /** * Setter for job position skill created timestamp *

* @param jobPositionSkillCreated Job position skill created timestamp */ - void setJobPositionSkillCreated (final Calendar jobPositionSkillCreated); + void setJobPositionSkillCreated (final Date jobPositionSkillCreated); /** * Getter for job position skill updated timestamp *

* @return Job position skill updated timestamp */ - Calendar getJobPositionSkillUpdated (); + Date getJobPositionSkillUpdated (); /** * Setter for job position skill updated timestamp *

* @param jobPositionSkillUpdated Job position skill updated timestamp */ - void setJobPositionSkillUpdated (final Calendar jobPositionSkillUpdated); + void setJobPositionSkillUpdated (final Date jobPositionSkillUpdated); /** * Getter for job skill diff --git a/src/org/mxchange/jjobs/model/skill/JobSkill.java b/src/org/mxchange/jjobs/model/skill/JobSkill.java index 3b72324..4cb61e0 100644 --- a/src/org/mxchange/jjobs/model/skill/JobSkill.java +++ b/src/org/mxchange/jjobs/model/skill/JobSkill.java @@ -17,7 +17,7 @@ package org.mxchange.jjobs.model.skill; import org.mxchange.jjobs.model.skill.status.SkillStatus; -import java.util.Calendar; +import java.util.Date; import java.util.Objects; import javax.persistence.Basic; import javax.persistence.Column; @@ -56,7 +56,7 @@ public class JobSkill implements Skillable { @Basic (optional = false) @Column (name = "skill_created", nullable = false, updatable = false) @Temporal (TemporalType.TIMESTAMP) - private Calendar skillCreated; + private Date skillCreated; /** * Id number (primary key) @@ -71,7 +71,7 @@ public class JobSkill implements Skillable { */ @Column (name = "skill_last_locked", insertable = false) @Temporal (TemporalType.TIMESTAMP) - private Calendar skillLastLocked; + private Date skillLastLocked; /** * Skill name @@ -93,7 +93,7 @@ public class JobSkill implements Skillable { */ @Column (name = "skill_updated", insertable = false) @Temporal (TemporalType.TIMESTAMP) - private Calendar skillUpdated; + private Date skillUpdated; @Override public boolean equals (final Object object) { @@ -118,13 +118,13 @@ public class JobSkill implements Skillable { @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getSkillCreated () { + public Date getSkillCreated () { return this.skillCreated; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setSkillCreated (final Calendar skillCreated) { + public void setSkillCreated (final Date skillCreated) { this.skillCreated = skillCreated; } @@ -140,13 +140,13 @@ public class JobSkill implements Skillable { @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getSkillLastLocked () { + public Date getSkillLastLocked () { return this.skillLastLocked; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setSkillLastLocked (final Calendar skillLastLocked) { + public void setSkillLastLocked (final Date skillLastLocked) { this.skillLastLocked = skillLastLocked; } @@ -172,13 +172,13 @@ public class JobSkill implements Skillable { @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getSkillUpdated () { + public Date getSkillUpdated () { return this.skillUpdated; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setSkillUpdated (final Calendar skillUpdated) { + public void setSkillUpdated (final Date skillUpdated) { this.skillUpdated = skillUpdated; } diff --git a/src/org/mxchange/jjobs/model/skill/Skillable.java b/src/org/mxchange/jjobs/model/skill/Skillable.java index 6bc3da6..7288e3c 100644 --- a/src/org/mxchange/jjobs/model/skill/Skillable.java +++ b/src/org/mxchange/jjobs/model/skill/Skillable.java @@ -18,7 +18,7 @@ package org.mxchange.jjobs.model.skill; import org.mxchange.jjobs.model.skill.status.SkillStatus; import java.io.Serializable; -import java.util.Calendar; +import java.util.Date; /** * A POJI for skills (hard and soft) @@ -60,42 +60,42 @@ public interface Skillable extends Serializable { *

* @return Skill created timestamp */ - Calendar getSkillCreated (); + Date getSkillCreated (); /** * Setter for skill created timestamp *

* @param skillCreated Skill created timestamp */ - void setSkillCreated (final Calendar skillCreated); + void setSkillCreated (final Date skillCreated); /** * Getter for skill updated timestamp *

* @return Skill updated timestamp */ - Calendar getSkillUpdated (); + Date getSkillUpdated (); /** * Setter for skill updated timestamp *

* @param skillUpdated Skill updated timestamp */ - void setSkillUpdated (final Calendar skillUpdated); + void setSkillUpdated (final Date skillUpdated); /** * Getter for skill last locked timestamp *

* @return Skill last locked timestamp */ - Calendar getSkillLastLocked (); + Date getSkillLastLocked (); /** * Setter for skill last locked timestamp *

* @param skillLastLocked Skill last locked timestamp */ - void setSkillLastLocked (final Calendar skillLastLocked); + void setSkillLastLocked (final Date skillLastLocked); /** * Getter for skill status diff --git a/src/org/mxchange/jjobs/model/user/skills/SkillableUser.java b/src/org/mxchange/jjobs/model/user/skills/SkillableUser.java index 276de73..2907f81 100644 --- a/src/org/mxchange/jjobs/model/user/skills/SkillableUser.java +++ b/src/org/mxchange/jjobs/model/user/skills/SkillableUser.java @@ -18,7 +18,7 @@ package org.mxchange.jjobs.model.user.skills; import org.mxchange.jjobs.model.skill.Skillable; import java.io.Serializable; -import java.util.Calendar; +import java.util.Date; import org.mxchange.jusercore.model.user.User; /** @@ -47,28 +47,28 @@ public interface SkillableUser extends Serializable { *

* @return Job position skill created timestamp */ - Calendar getUserSkillCreated (); + Date getUserSkillCreated (); /** * Setter for user skill created timestamp *

* @param userSkillCreated Job position skill created timestamp */ - void setUserSkillCreated (final Calendar userSkillCreated); + void setUserSkillCreated (final Date userSkillCreated); /** * Getter for user skill updated timestamp *

* @return Job position skill updated timestamp */ - Calendar getUserSkillUpdated (); + Date getUserSkillUpdated (); /** * Setter for user skill updated timestamp *

* @param userSkillUpdated Job position skill updated timestamp */ - void setUserSkillUpdated (final Calendar userSkillUpdated); + void setUserSkillUpdated (final Date userSkillUpdated); /** * Getter for job skill diff --git a/src/org/mxchange/jjobs/model/user/skills/UserSkill.java b/src/org/mxchange/jjobs/model/user/skills/UserSkill.java index 5380924..8da9fa7 100644 --- a/src/org/mxchange/jjobs/model/user/skills/UserSkill.java +++ b/src/org/mxchange/jjobs/model/user/skills/UserSkill.java @@ -18,7 +18,7 @@ package org.mxchange.jjobs.model.user.skills; import org.mxchange.jjobs.model.skill.JobSkill; import org.mxchange.jjobs.model.skill.Skillable; -import java.util.Calendar; +import java.util.Date; import javax.persistence.Basic; import javax.persistence.CascadeType; import javax.persistence.Column; @@ -71,7 +71,7 @@ public class UserSkill implements SkillableUser { @Basic (optional = false) @Column (name = "user_skill_created", nullable = false, updatable = false) @Temporal (TemporalType.TIMESTAMP) - private Calendar userSkillCreated; + private Date userSkillCreated; /** * Id number (primary key) @@ -86,7 +86,7 @@ public class UserSkill implements SkillableUser { */ @Column (name = "user_skill_updated", insertable = false) @Temporal (TemporalType.TIMESTAMP) - private Calendar userSkillUpdated; + private Date userSkillUpdated; @Override public Skillable getJobSkill () { @@ -110,13 +110,13 @@ public class UserSkill implements SkillableUser { @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getUserSkillCreated () { + public Date getUserSkillCreated () { return this.userSkillCreated; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setUserSkillCreated (final Calendar userSkillCreated) { + public void setUserSkillCreated (final Date userSkillCreated) { this.userSkillCreated = userSkillCreated; } @@ -132,13 +132,13 @@ public class UserSkill implements SkillableUser { @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getUserSkillUpdated () { + public Date getUserSkillUpdated () { return this.userSkillUpdated; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setUserSkillUpdated (final Calendar userSkillUpdated) { + public void setUserSkillUpdated (final Date userSkillUpdated) { this.userSkillUpdated = userSkillUpdated; } -- 2.39.5