src/main/java/com/qa/IMS/persistence/dao/ItemDAO.java
@Override
	public int delete(long id) {
		try (Connection connection = DBUtils.getInstance().getConnection();
				Statement statement = connection.createStatement()) {
			statement.executeUpdate("delete from orders_items where item_id = " + id);
			statement.executeUpdate("delete from product where item_id = " + id);
			return 1;
		} catch (Exception e) {
			
			LOGGER.info(e.getMessage());
		}
		return 0;
	}
/**
	 * Deletes a customer in the database
	 * 
	 * @param id - id of the customer
	 */
Deletes a customer in the database

@param id - id of the customer
Deletes a customer in the database @param id - id of the customer
@Override
	public int delete(long id) {
		try (Connection connection = DBUtils.getInstance().getConnection();
				Statement statement = connection.createStatement()) {
			statement.executeUpdate("delete from orders_items where item_id = " + id);
			statement.executeUpdate("delete from product where item_id = " + id);
			return 1;
		} catch (Exception e) {
			LOGGER.info(e.getMessage());
		}
		return 0;
	}
@ Override public int delete ( long id ) { try ( Connection connection = DBUtils . getInstance ( ) . getConnection ( ) ; Statement statement = connection . createStatement ( ) ) { statement . executeUpdate ( "delete from orders_items where item_id = " + id ) ; statement . executeUpdate ( "delete from product where item_id = " + id ) ; return 1 ; } catch ( Exception e ) { LOGGER . info ( e . getMessage ( ) ) ; } return 0 ; }
Deletes a customer in the database
Deletes a customer in the database