@Override
	public List<E> toResultList(ResultSet resultSet) throws ResultMapException {
		List<E> resultList = new LinkedList<E>();
		if(resultSet == null) {
			logger.warn("ResultSet is null. Returning empty list");
			return resultList;
		}
		try {
			if(resultSet.isClosed()) {
				logger.warn("ResultSet is closed. Returning empty list.");
				return resultList;
			}
		} catch (SQLException e) {
			logger.debug("Failed while checking whether the ResultSet is closed",e);
			return resultList;
		}
		
		try {
			while(resultSet.next()) {
				E instance = toResult(resultSet);
				resultList.add(instance);
			}
		} catch (SQLException e) {
			throw new ResultMapException("Failed to map an instance while traversing the ResultSet",e);
		}
		return resultList;
	}