]> git.mxchange.org Git - jcontacts-business-core.git/commitdiff
Don't implement lists in a POJO/POJI, better handle it outside of it
authorRoland Haeder <roland@mxchange.org>
Tue, 16 Feb 2016 11:46:58 +0000 (12:46 +0100)
committerRoland Haeder <roland@mxchange.org>
Tue, 16 Feb 2016 11:46:58 +0000 (12:46 +0100)
src/org/mxchange/jcontactsbusiness/BusinessContact.java
src/org/mxchange/jcontactsbusiness/CompanyContact.java

index a989730efce0849250e361e364d38c3f444c1be4..a6452548e16c3bb1dfc931673f942f274d401f3f 100644 (file)
@@ -102,20 +102,6 @@ public interface BusinessContact extends Serializable {
         */
        void setCompanyFounder (final Employee companyFounder);
 
-       /**
-        * Getter for list of employees
-        * <p>
-        * @return List of employees
-        */
-       List<Employee> getEmployees ();
-
-       /**
-        * Setter for list of employees
-        * <p>
-        * @param employees List of employees
-        */
-       void setEmployees (final List<Employee> employees);
-
        /**
         * Getter for headquarters data
         * <p>
index 965a93c728e2868b9bc579e33a0c9904d9b5d5d1..2319949cf9f19a6eddbecbcee6744c8fa81e0b0d 100644 (file)
@@ -27,7 +27,6 @@ import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.JoinColumn;
-import javax.persistence.OneToMany;
 import javax.persistence.OneToOne;
 import javax.persistence.Table;
 import javax.persistence.Temporal;
@@ -107,13 +106,6 @@ public class CompanyContact implements BusinessContact, Comparable<BusinessConta
        @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.MERGE, optional = false)
        private User contactUserOwner;
 
-       /**
-        * Reference to employee list
-        */
-       @JoinColumn (name = "company_employees_id", nullable = false, updatable = false)
-       @OneToMany (targetEntity = CompanyEmployee.class, cascade = CascadeType.ALL)
-       private List<Employee> employees;
-
        /**
         * Reference to headquarters data
         */
@@ -209,16 +201,6 @@ public class CompanyContact implements BusinessContact, Comparable<BusinessConta
                this.contactUserOwner = contactUserOwner;
        }
 
-       @Override
-       public List<Employee> getEmployees () {
-               return this.employees;
-       }
-
-       @Override
-       public void setEmployees (final List<Employee> employees) {
-               this.employees = employees;
-       }
-
        @Override
        public HeadQuartersData getHeadQuartersData () {
                return this.headQuartersData;