]> git.mxchange.org Git - jjobs-core.git/commitdiff
Don't cherry-pick:
authorRoland Häder <roland@mxchange.org>
Thu, 10 Oct 2019 20:50:14 +0000 (22:50 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 10 Oct 2019 20:50:14 +0000 (22:50 +0200)
- 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

Signed-off-by: Roland Häder <roland@mxchange.org>
lib/jcore-utils.jar [deleted file]
src/org/mxchange/jjobs/model/jobposition/HireableJobPosition.java [deleted file]
src/org/mxchange/jjobs/model/jobposition/OpenJobPosition.java [deleted file]
src/org/mxchange/jjobs/model/jobposition/status/JobPositionStatus.java [deleted file]
src/org/mxchange/jjobs/model/jobskill/JobPositionSkill.java
src/org/mxchange/jjobs/model/jobskill/SkillableJobPosition.java

diff --git a/lib/jcore-utils.jar b/lib/jcore-utils.jar
deleted file mode 100644 (file)
index 87bd50a..0000000
Binary files a/lib/jcore-utils.jar and /dev/null differ
diff --git a/src/org/mxchange/jjobs/model/jobposition/HireableJobPosition.java b/src/org/mxchange/jjobs/model/jobposition/HireableJobPosition.java
deleted file mode 100644 (file)
index 2bf0652..0000000
+++ /dev/null
@@ -1,115 +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 <http://www.gnu.org/licenses/>.
- */
-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
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public interface HireableJobPosition extends JobPosition {
-
-       /**
-        * Getter for job position start
-        * <p>
-        * @return Job position start
-        */
-       Date getJobPositionStart ();
-
-       /**
-        * Setter for job position start
-        * <p>
-        * @param jobPositionStart Job position start
-        */
-       void setJobPositionStart (final Date jobPositionStart);
-
-       /**
-        * Getter for job position status
-        * <p>
-        * @return Job position status
-        */
-       JobPositionStatus getJobPositionStatus ();
-
-       /**
-        * Setter for job position status
-        * <p>
-        * @param jobPositionStatus Job position status
-        */
-       void setJobPositionStatus (final JobPositionStatus jobPositionStatus);
-
-       /**
-        * Getter for when this job position was deleted by user
-        * <p>
-        * @return When this job position was deleted by user
-        */
-       Date getJobPositionDeleted ();
-
-       /**
-        * Setter for when this job position was deleted by user
-        * <p>
-        * @param jobPositionDeleted When this job position was deleted by user
-        */
-       void setJobPositionDeleted (final Date jobPositionDeleted);
-
-       /**
-        * Getter for when this job position has expired
-        * <p>
-        * @return When this job position has expired
-        */
-       Date getJobPositionExpired ();
-
-       /**
-        * Setter for when this job position has expired
-        * <p>
-        * @param jobPositionExpired When this job position has expired
-        */
-       void setJobPositionExpired (final Date jobPositionExpired);
-
-       /**
-        * Getter for when employee was hired for this job position
-        * <p>
-        * @return When employee was hired for this job position
-        */
-       Date getJobPositionHired ();
-
-       /**
-        * Setter for when employee was hired for this job position
-        * <p>
-        * @param jobPositionHired When employee was hired for this job position
-        */
-       void setJobPositionHired (final Date jobPositionHired);
-
-       /**
-        * Getter for user who added this job position
-        * <p>
-        * @return User who added this job position
-        */
-       User getJobPositionAddedUser ();
-
-       /**
-        * Setter for user who added this job position
-        * <p>
-        * @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 (file)
index 663cdb3..0000000
+++ /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 <http://www.gnu.org/licenses/>.
- */
-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)
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@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 (file)
index d50381d..0000000
+++ /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 <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jjobs.model.jobposition.status;
-
-/**
- * An enumeration for job position status
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-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
-        * <p>
-        * @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
-        * <p>
-        * @return Message key for i18n bundles
-        */
-       public String getMessageKey () {
-               return this.messageKey;
-       }
-
-       /**
-        * Getter for CSS class
-        * <p>
-        * @return CSS class
-        */
-       public String getStyleClass () {
-               return this.styleClass;
-       }
-
-}
index b880919e6d7d76b4c122f5d14a5894bc81327ae6..ea09050f73f85246c775128bcfd4a60f7a826b4c 100644 (file)
@@ -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;
 
        /**
index 0861c1d61146ccea6b978bd2e2d9d961dc9a9fcb..d20ea137b2a360c4153749287505d61c8a92c15a 100644 (file)
@@ -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;