- compareTo()/Comparable<T> was used back in the TDGP times and is no longer needed
- value first, then variable on comparison to avoid accidently assignments
- updated jar(s)
@NamedQuery (name = "SearchAddressbookById", query = "SELECT a FROM addressbooks AS a WHERE a.addressbookId = :id")
}
)
-public class UserAddressbook implements Addressbook, Comparable<Addressbook> {
+public class UserAddressbook implements Addressbook {
/**
* Serial number
this.addressbookStatus = AddressbokStatus.UNLOCKED;
}
- @Override
- public int compareTo (final Addressbook addressbook) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
- }
-
@Override
public boolean equals (final Object object) {
- if (object == null) {
+ if (null == object) {
return false;
} else if (this.getClass() != object.getClass()) {
return false;
import java.io.Serializable;
import java.util.Calendar;
-import org.mxchange.jjobs.model.addressbook.Addressbook;
import org.mxchange.jcontacts.contact.Contact;
import org.mxchange.jcontactsbusiness.BusinessContact;
+import org.mxchange.jjobs.model.addressbook.Addressbook;
/**
* A POJI for addressbook entries
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")
)
-public class UserAddressbookEntry implements AddressbookEntry, Comparable<AddressbookEntry> {
+public class UserAddressbookEntry implements AddressbookEntry {
/**
* Serial number
@OneToOne (targetEntity = UserAddressbook.class, optional = false, cascade = CascadeType.REFRESH)
private Addressbook addressbookId;
- @Override
- public int compareTo (final AddressbookEntry addressbookEntry) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
- }
-
@Override
public boolean equals (final Object object) {
- if (object == null) {
+ if (null == object) {
return false;
} else if (this.getClass() != object.getClass()) {
return false;
)
}
)
-public class AddressbookShare implements ShareableAddressbook, Comparable<ShareableAddressbook> {
+public class AddressbookShare implements ShareableAddressbook {
/**
* Serial number
public AddressbookShare () {
}
- @Override
- public int compareTo (final ShareableAddressbook share) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
- }
-
@Override
public boolean equals (final Object object) {
- if (object == null) {
+ if (null == object) {
return false;
} else if (this.getClass() != object.getClass()) {
return false;
addressbook = this.addressbookBean.getAddressbookById(addressbookId);
// Is it set?
- if (addressbook == null) {
+ if (null == addressbook) {
// Is null?!
throw new NullPointerException(MessageFormat.format("addressbook for id={0} is null", addressbookId)); //NOI18N
}