src/main/java/com/qa/IMS/persistence/dao/ItemDAO.java
@Override
	public List<Item> readAll() {
		try (Connection connection = DBUtils.getInstance().getConnection();
				Statement statement = connection.createStatement();
				ResultSet resultSet = statement.executeQuery("select * from product");) {
			List<Item> items = new ArrayList<>();
			while (resultSet.next()) {
				items.add(modelFromResultSet(resultSet));
			}
			return items;
		} catch (SQLException e) {
			
			LOGGER.info(e.getMessage());
		}
		return new ArrayList<>();
	}
/**
	 * Reads all customers from the database
	 * 
	 * @return A list of customers
	 */
Reads all customers from the database

@return A list of customers
Reads all customers from the database @return A list of customers
@Override
	public List<Item> readAll() {
		try (Connection connection = DBUtils.getInstance().getConnection();
				Statement statement = connection.createStatement();
				ResultSet resultSet = statement.executeQuery("select * from product");) {
			List<Item> items = new ArrayList<>();
			while (resultSet.next()) {
				items.add(modelFromResultSet(resultSet));
			}
			return items;
		} catch (SQLException e) {
			LOGGER.info(e.getMessage());
		}
		return new ArrayList<>();
	}
@ Override public List < Item > readAll ( ) { try ( Connection connection = DBUtils . getInstance ( ) . getConnection ( ) ; Statement statement = connection . createStatement ( ) ; ResultSet resultSet = statement . executeQuery ( "select * from product" ) ; ) { List < Item > items = new ArrayList < > ( ) ; while ( resultSet . next ( ) ) { items . add ( modelFromResultSet ( resultSet ) ) ; } return items ; } catch ( SQLException e ) { LOGGER . info ( e . getMessage ( ) ) ; } return new ArrayList < > ( ) ; }
Reads all customers from the database
Reads all customers from the database