package com.realnet.order_estimation.Services;
import java.util.*;
import com.realnet.order_estimation.Repository.ProductssRepository;
import com.realnet.order_estimation.Entity.Productss;

import com.realnet.order_estimation.Entity.Productss_ListFilter1;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
	import org.springframework.stereotype.Service;

@Service
 public class Productss_ListFilter1Service {
@Autowired
private ProductssRepository Repository;




 public   List<Productss_ListFilter1>   getlistbuilder() {
	List<Productss> list= Repository.findAll();
		ArrayList<Productss_ListFilter1> l = new ArrayList<>();
		for (Productss data : list) {
{	
Productss_ListFilter1 dummy = new Productss_ListFilter1();
			dummy.setId(data.getId());
  dummy.setProduct_name(data.getProduct_name());
	l.add(dummy);
} 
} 		
return l;}



 public   List<Productss_ListFilter1>   getlistbuilderparam( ) {
	List<Productss> list= Repository.findAll();
		ArrayList<Productss_ListFilter1> l = new ArrayList<>();
		for (Productss data : list) {
{	
Productss_ListFilter1 dummy = new Productss_ListFilter1();
			dummy.setId(data.getId());
  dummy.setProduct_name(data.getProduct_name());
	l.add(dummy);
} 
} 		
return l;}
}