]> git.mxchange.org Git - jaddressbook-core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Wed, 18 Oct 2017 00:57:10 +0000 (02:57 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 18 Oct 2017 00:57:10 +0000 (02:57 +0200)
- fixed imports
- added curly braces for later more named queries

Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jaddressbook/model/addressbook/entry/AddressbookEntry.java
src/org/mxchange/jaddressbook/model/addressbook/entry/UserAddressbookEntry.java

index 7db2136279b5026f31892011daefc7c431fd2715..439cdfaf8a32a12b72e54abc14b29f62d33261d6 100644 (file)
@@ -20,7 +20,7 @@ import java.io.Serializable;
 import java.util.Date;
 import org.mxchange.jaddressbook.model.addressbook.Addressbook;
 import org.mxchange.jcontacts.model.contact.Contact;
-import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
+import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
 
 /**
  * A POJI for addressbook entries
@@ -48,14 +48,14 @@ public interface AddressbookEntry extends Serializable {
         * <p>
         * @return Business contact
         */
-       BusinessBasicData getAddressbookEntryBusinessContact ();
+       BasicData getAddressbookEntryBusinessContact ();
 
        /**
         * Setter for business contact
         * <p>
         * @param addressbookEntryBusinessContact Business contact
         */
-       void setAddressbookEntryBusinessContact (final BusinessBasicData addressbookEntryBusinessContact);
+       void setAddressbookEntryBusinessContact (final BasicData addressbookEntryBusinessContact);
 
        /**
         * Getter for entry created timestamp
index 885929f35a3e1286bf6fd292439ae4fba30e1707..3e71d21b4d61fc1517675212acbe24742d185913 100644 (file)
@@ -37,7 +37,7 @@ import org.mxchange.jaddressbook.model.addressbook.Addressbook;
 import org.mxchange.jaddressbook.model.addressbook.UserAddressbook;
 import org.mxchange.jcontacts.model.contact.Contact;
 import org.mxchange.jcontacts.model.contact.UserContact;
-import org.mxchange.jcontactsbusiness.model.basicdata.CompanyBasicData;
+import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
 import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
 
 /**
@@ -48,9 +48,12 @@ import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
 @Entity (name = "addressbook_entries")
 @Table (name = "addressbook_entries")
 @NamedQueries (
-               @NamedQuery (
-                               name = "SearchUsersAddressbookEntries",
-                               query = "SELECT e FROM addressbook_entries AS e INNER JOIN addressbooks AS a ON e.addressbookId = a WHERE e.addressbookId = :addressbook AND a.addressbookUser = :owner ORDER BY e.addressbookEntryId ASC")
+               {
+                       @NamedQuery (
+                                       name = "SearchUsersAddressbookEntries",
+                                       query = "SELECT e FROM addressbook_entries AS e INNER JOIN addressbooks AS a ON e.addressbookId = a WHERE e.addressbookId = :addressbook AND a.addressbookUser = :owner ORDER BY e.addressbookEntryId ASC"
+                       )
+               }
 )
 @SuppressWarnings ("PersistenceUnitPresent")
 public class UserAddressbookEntry implements AddressbookEntry {
@@ -65,8 +68,8 @@ public class UserAddressbookEntry implements AddressbookEntry {
         * Connection to table "business_contacts" (commercial contacts)
         */
        @JoinColumn (name = "entry_business_contact_id", updatable = false)
-       @OneToOne (targetEntity = CompanyBasicData.class, cascade = CascadeType.REFRESH)
-       private BusinessBasicData addressbookEntryBusinessContact;
+       @OneToOne (targetEntity = BusinessBasicData.class, cascade = CascadeType.REFRESH)
+       private BasicData addressbookEntryBusinessContact;
 
        /**
         * When this address book entry has been created
@@ -131,12 +134,12 @@ public class UserAddressbookEntry implements AddressbookEntry {
        }
 
        @Override
-       public BusinessBasicData getAddressbookEntryBusinessContact () {
+       public BasicData getAddressbookEntryBusinessContact () {
                return this.addressbookEntryBusinessContact;
        }
 
        @Override
-       public void setAddressbookEntryBusinessContact (final BusinessBasicData addressbookEntryBusinessContact) {
+       public void setAddressbookEntryBusinessContact (final BasicData addressbookEntryBusinessContact) {
                this.addressbookEntryBusinessContact = addressbookEntryBusinessContact;
        }