public static void requestAddToCart(int userId, int productId, int qty) { if (CartHandler.isItemAlreadyExist(userId, productId)) //If there's item that wants to add { CartHandler.updateQtyForExistingItem(userId, productId, qty); } else { CartHandler.createNewCart(userId, productId, qty); } }