From 67fac906ce908d1bc920735959077d21eb4502a0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 10 Oct 2019 22:50:14 +0200 Subject: [PATCH] Don't cherry-pick: - moved all remaining entity properties (and in POJI, too) to jcontacts-business-core, maybe one day this will change again? - removed no longer needed jcore-utils.jar MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- lib/jcore-utils.jar | Bin 4486 -> 0 bytes .../jobposition/HireableJobPosition.java | 115 -------- .../model/jobposition/OpenJobPosition.java | 276 ------------------ .../jobposition/status/JobPositionStatus.java | 91 ------ .../model/jobskill/JobPositionSkill.java | 6 +- .../model/jobskill/SkillableJobPosition.java | 2 +- 6 files changed, 4 insertions(+), 486 deletions(-) delete mode 100644 lib/jcore-utils.jar delete mode 100644 src/org/mxchange/jjobs/model/jobposition/HireableJobPosition.java delete mode 100644 src/org/mxchange/jjobs/model/jobposition/OpenJobPosition.java delete mode 100644 src/org/mxchange/jjobs/model/jobposition/status/JobPositionStatus.java diff --git a/lib/jcore-utils.jar b/lib/jcore-utils.jar deleted file mode 100644 index 87bd50a5ceb1c1ec18b950f12a23880b45c02494..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4486 zcmb7IO>7%k9siFV$H{E6ZMyBUrQP(^+0ZzR?KtU2$X9XPq;={zQS79IMO5SQi#^%# zjF}ndV?m&zJ**Z9?FA%Ohyz-|B^NGi1yZ^11qpE|2ROn3af1s&3%@rru_tbm?OK|z z_x>Nh_y7Oj@4e@>2jMQ6sE6p!13y`zz^|9OXl1dKN#qJksn0$oT5E|ugDC&UL%j)c zah=E25?#p@a!ZTFQgUT!MKQE(ZaaxhZrPe?OtW-yykE{3ftE}|QEQx`4V~%nUQVYI6XMQBRxL%!?Y9!_T&9>zkD2KU_clT zk!e*^CrkAE67_wxrWjRzis&1iqC2W-@us8cc8AtC|1xy=hcJ=2&OxgcsWMj#J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CZ&5QNId{2uwJj`4MxtI(Ol?uDK9P~-Ws$=(ZBe%( zKzVMpw1ta8xL6dz9-nq38P@#?S288KctRD$bKqAovn7z0;MX>r3TBFc5Iuqu2bJ%D zr3AmeHG2ICNk64X_)r@CrC?O)Iv!nzqraihbzD!#Csjd+gJ5m~q4v-?Jf%Ubli;`; zAkbT&#c4b}GKF22DDjE6i!Nmf_KQ$h?(TMhTmnQ7NZ02A=>m|hClvA6y$$3(fGh*Z z0{~e8kOBa#!CC1TkjvnG56B?iL|~2qxzYmi`4Q;`knSfG?F3Q=kP3is0I32<4FGlk z#5e|oAwM3F7~Y-(GUNkk`l%T_F*QKZ(+T0bfbcy)_&y*!2818L^?QKuegMKCk}>Q; z7{vNGd>leZOi&*}aB1uHmNpS}Z)y7xmbMRFt4B*)oJP?r(RJKIG`99Y3Y`z1e4cg@ zpd$a75pS)7pm(}%tG?)b?Wq!d{8;#EsRmBlLFdB4k%oARqp$Z9&i{y4!A7TPh@-Ig z6B_@*>oNX1O;sF?y`NCMf}O%K)xeIg(@N)2`N+=4k2heYHR#sCxl_M$uie%!VGn!~ ris0VT-FbJK?cAfZ&D!|m. - */ -package org.mxchange.jjobs.model.jobposition; - -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; - -/** - * A POJI for hireable job positions - *

- * @author Roland Häder - */ -public interface HireableJobPosition extends JobPosition { - - /** - * Getter for job position start - *

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

- * @param jobPositionStart Job position start - */ - void setJobPositionStart (final Date jobPositionStart); - - /** - * Getter for job position status - *

- * @return Job position status - */ - JobPositionStatus getJobPositionStatus (); - - /** - * Setter for job position status - *

- * @param jobPositionStatus Job position status - */ - void setJobPositionStatus (final JobPositionStatus jobPositionStatus); - - /** - * Getter for when this job position was deleted by user - *

- * @return When this job position was deleted by user - */ - 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 Date jobPositionDeleted); - - /** - * Getter for when this job position has expired - *

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

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

- * @return When employee was hired for this job position - */ - 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 Date jobPositionHired); - - /** - * Getter for user who added this job position - *

- * @return User who added this job position - */ - User getJobPositionAddedUser (); - - /** - * Setter for user who added this job position - *

- * @param jobPositionAddedUser User who added this job position - */ - void setJobPositionAddedUser (final User jobPositionAddedUser); - -} diff --git a/src/org/mxchange/jjobs/model/jobposition/OpenJobPosition.java b/src/org/mxchange/jjobs/model/jobposition/OpenJobPosition.java deleted file mode 100644 index 663cdb3..0000000 --- a/src/org/mxchange/jjobs/model/jobposition/OpenJobPosition.java +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Copyright (C) 2016 - 2019 Free Software Foundation - * - * 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 - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.mxchange.jjobs.model.jobposition; - -import java.util.Date; -import java.util.Objects; -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.OneToOne; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import javax.persistence.Transient; -import org.mxchange.jjobs.model.jobposition.status.JobPositionStatus; -import org.mxchange.jusercore.model.user.LoginUser; -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 - */ -@Entity (name = "open_job_position") -@Table ( - name = "open_job_position" -) -@SuppressWarnings ("PersistenceUnitPresent") -public class OpenJobPosition implements HireableJobPosition { - - /** - * Serial number - */ - @Transient - private static final long serialVersionUID = 547_102_736_712_809_694L; - - /** - * User who has added this job position - */ - @JoinColumn (name = "job_position_added_user_id", referencedColumnName = "user_id", updatable = false) - @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.REFRESH, optional = false) - private User jobPositionAddedUser; - - /** - * When this entry has been created - */ - @Basic (optional = false) - @Column (name = "job_position_created", nullable = false, updatable = false) - @Temporal (TemporalType.TIMESTAMP) - private Date jobPositionCreated; - - /** - * When this job position (offer) was deleted - */ - @Column (name = "job_position_deleted") - @Temporal (TemporalType.TIMESTAMP) - private Date jobPositionDeleted; - - /** - * When this job position (offer) has expired - */ - @Column (name = "job_position_expired") - @Temporal (TemporalType.TIMESTAMP) - private Date jobPositionExpired; - - /** - * When a new employed was hired for this job position - */ - @Column (name = "job_position_hired") - @Temporal (TemporalType.TIMESTAMP) - private Date jobPositionHired; - - /** - * Id number (primary key) - */ - @Id - @GeneratedValue (strategy = GenerationType.IDENTITY) - @Column (name = "job_position_id", nullable = false, updatable = false) - private Long jobPositionId; - - /** - * Name of the position (example: Store Worker) - */ - @Basic (optional = false) - @Column (name = "job_position_name", nullable = false, unique = true) - private String jobPositionName; - - /** - * When this job position (offer) starts - */ - @Basic (optional = false) - @Column (name = "job_position_start", nullable = false) - @Temporal (TemporalType.DATE) - private Date jobPositionStart; - - /** - * Job position status - */ - @Basic (optional = false) - @Column (name = "job_position_status", nullable = false) - @Enumerated (EnumType.STRING) - private JobPositionStatus jobPositionStatus; - - /** - * When this entry has been created - */ - @Column (name = "job_position_updated", insertable = false) - @Temporal (TemporalType.TIMESTAMP) - private Date jobPositionUpdated; - - @Override - public boolean equals (final Object object) { - if (this == object) { - return true; - } else if (null == object) { - return false; - } else if (this.getClass() != object.getClass()) { - return false; - } - - final HireableJobPosition other = (HireableJobPosition) object; - - if (!Objects.equals(this.getJobPositionName(), other.getJobPositionName())) { - return false; - } else if (!Objects.equals(this.getJobPositionId(), other.getJobPositionId())) { - return false; - } - - return true; - } - - @Override - public User getJobPositionAddedUser () { - return this.jobPositionAddedUser; - } - - @Override - public void setJobPositionAddedUser (final User jobPositionAddedUser) { - this.jobPositionAddedUser = jobPositionAddedUser; - } - - @Override - @SuppressWarnings ("ReturnOfDateField") - public Date getJobPositionCreated () { - return this.jobPositionCreated; - } - - @Override - @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setJobPositionCreated (final Date jobPositionCreated) { - this.jobPositionCreated = jobPositionCreated; - } - - @Override - @SuppressWarnings ("ReturnOfDateField") - public Date getJobPositionDeleted () { - return this.jobPositionDeleted; - } - - @Override - @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setJobPositionDeleted (final Date jobPositionDeleted) { - this.jobPositionDeleted = jobPositionDeleted; - } - - @Override - @SuppressWarnings ("ReturnOfDateField") - public Date getJobPositionExpired () { - return this.jobPositionExpired; - } - - @Override - @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setJobPositionExpired (final Date jobPositionExpired) { - this.jobPositionExpired = jobPositionExpired; - } - - @Override - @SuppressWarnings ("ReturnOfDateField") - public Date getJobPositionHired () { - return this.jobPositionHired; - } - - @Override - @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setJobPositionHired (final Date jobPositionHired) { - this.jobPositionHired = jobPositionHired; - } - - @Override - public Long getJobPositionId () { - return this.jobPositionId; - } - - @Override - public void setJobPositionId (final Long jobPositionId) { - this.jobPositionId = jobPositionId; - } - - @Override - public String getJobPositionName () { - return this.jobPositionName; - } - - @Override - public void setJobPositionName (final String jobPositionName) { - this.jobPositionName = jobPositionName; - } - - @Override - @SuppressWarnings ("ReturnOfDateField") - public Date getJobPositionStart () { - return this.jobPositionStart; - } - - @Override - @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setJobPositionStart (final Date jobPositionStart) { - this.jobPositionStart = jobPositionStart; - } - - @Override - public JobPositionStatus getJobPositionStatus () { - return this.jobPositionStatus; - } - - @Override - public void setJobPositionStatus (final JobPositionStatus jobPositionStatus) { - this.jobPositionStatus = jobPositionStatus; - } - - @Override - @SuppressWarnings ("ReturnOfDateField") - public Date getJobPositionUpdated () { - return this.jobPositionUpdated; - } - - @Override - @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setJobPositionUpdated (final Date jobPositionUpdated) { - this.jobPositionUpdated = jobPositionUpdated; - } - - @Override - public int hashCode () { - int hash = 7; - - hash = 37 * hash + Objects.hashCode(this.getJobPositionId()); - hash = 37 * hash + Objects.hashCode(this.getJobPositionName()); - - return hash; - } - -} diff --git a/src/org/mxchange/jjobs/model/jobposition/status/JobPositionStatus.java b/src/org/mxchange/jjobs/model/jobposition/status/JobPositionStatus.java deleted file mode 100644 index d50381d..0000000 --- a/src/org/mxchange/jjobs/model/jobposition/status/JobPositionStatus.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) 2016 - 2019 Free Software Foundation - * - * 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 - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.mxchange.jjobs.model.jobposition.status; - -/** - * An enumeration for job position status - *

- * @author Roland Häder - */ -public enum JobPositionStatus { - - /** - * Open job position status (open for applications) - */ - OPEN("JOB_POSITION_STATUS_OPEN", "job_position_status_open"), //NOI18N - - /** - * Hired job position status (new employee) - */ - HIRED("JOB_POSITION_STATUS_HIRED", "job_position_status_hired"), //NOI18N - - /** - * Deleted job position status (by user) - */ - DELETED("JOB_POSITION_STATUS_DELETED", "job_position_status_deleted"), //NOI18N - - /** - * Expired job position status (when no one applied for it) - */ - EXPIRED("JOB_POSITION_STATUS_DELETED", "job_position_status_expired"), //NOI18N - - /** - * Locked job position status (by administrator) - */ - LOCKED("JOB_POSITION_STATUS_LOCKED", "job_position_status_locked"); //NOI18N - - /** - * Message key for bundles - */ - private final String messageKey; - - /** - * CSS class - */ - private final String styleClass; - - /** - * Constructor with message key and CSS class - *

- * @param messageKey Message key - * @param styleClass CSS class - */ - private JobPositionStatus (final String messageKey, final String styleClass) { - // Set all - this.messageKey = messageKey; - this.styleClass = styleClass; - } - - /** - * Getter for i18n bundle message key - *

- * @return Message key for i18n bundles - */ - public String getMessageKey () { - return this.messageKey; - } - - /** - * Getter for CSS class - *

- * @return CSS class - */ - public String getStyleClass () { - return this.styleClass; - } - -} diff --git a/src/org/mxchange/jjobs/model/jobskill/JobPositionSkill.java b/src/org/mxchange/jjobs/model/jobskill/JobPositionSkill.java index b880919..ea09050 100644 --- a/src/org/mxchange/jjobs/model/jobskill/JobPositionSkill.java +++ b/src/org/mxchange/jjobs/model/jobskill/JobPositionSkill.java @@ -31,8 +31,8 @@ import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.persistence.Transient; -import org.mxchange.jjobs.model.jobposition.HireableJobPosition; -import org.mxchange.jjobs.model.jobposition.OpenJobPosition; +import org.mxchange.jcontactsbusiness.model.jobposition.EmployeePosition; +import org.mxchange.jcontactsbusiness.model.jobposition.HireableJobPosition; import org.mxchange.jjobs.model.skill.JobSkill; import org.mxchange.jjobs.model.skill.Skillable; import org.mxchange.jusercore.model.user.LoginUser; @@ -61,7 +61,7 @@ public class JobPositionSkill implements SkillableJobPosition { * Linked job position */ @JoinColumn (name = "skill_job_position_id", referencedColumnName = "job_position_id", updatable = false, nullable = false) - @OneToOne (cascade = CascadeType.ALL, targetEntity = OpenJobPosition.class, optional = false) + @OneToOne (cascade = CascadeType.ALL, targetEntity = EmployeePosition.class, optional = false) private HireableJobPosition jobPosition; /** diff --git a/src/org/mxchange/jjobs/model/jobskill/SkillableJobPosition.java b/src/org/mxchange/jjobs/model/jobskill/SkillableJobPosition.java index 0861c1d..d20ea13 100644 --- a/src/org/mxchange/jjobs/model/jobskill/SkillableJobPosition.java +++ b/src/org/mxchange/jjobs/model/jobskill/SkillableJobPosition.java @@ -18,7 +18,7 @@ package org.mxchange.jjobs.model.jobskill; import java.io.Serializable; import java.util.Date; -import org.mxchange.jjobs.model.jobposition.HireableJobPosition; +import org.mxchange.jcontactsbusiness.model.jobposition.HireableJobPosition; import org.mxchange.jjobs.model.skill.Skillable; import org.mxchange.jusercore.model.user.User; -- 2.39.5