* Adds given item instance to this basket
* <p>
* @param item Item instance to add
+ * <p>
* @throws org.mxchange.jshopcore.exceptions.BasketItemAlreadyAddedException
* If the item instance has already been added
*/
* item's id.
* <p>
* @param item Item instance to check
+ * <p>
* @return Whether the given item has been found
*/
public boolean isAdded (final T item);
AddableBasketItem item = (AddableBasketItem) object;
// Item id and type must be the same
- return ((Objects.equals(item.getItemProduct().getProductId(), this.getItemProduct().getProductId()))
- && (Objects.equals(item.getItemType(), this.getItemType())));
+ return ((Objects.equals(item.getItemProduct().getProductId(), this.getItemProduct().getProductId())) &&
+ (Objects.equals(item.getItemType(), this.getItemType())));
}
@Override
* Generates an unique customer number by checking is existence
* <p>
* @param em Entity manager instance
+ * <p>
* @return Generated customer number (not used before)
+ * <p>
* @throws java.sql.SQLException If any SQL error occured
*/
public static String generateCustomerNumber (final EntityManager em) throws SQLException {
* <p>
* @param em Entity manager instance
* @param customer Customer instance
+ * <p>
* @return An unique access key
*/
public static String generateAccessKey (final EntityManager em, final Customer customer) {