package com.realnet.order_estimation.Services;
import java.util.*;
import com.realnet.order_estimation.Repository.TypeRepository;
import com.realnet.order_estimation.Entity.Type;

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

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

@Service
 public class Type_ListFilter1Service {
@Autowired
private TypeRepository Repository;




 public   List<Type_ListFilter1>   getlistbuilder() {
	List<Type> list= Repository.findAll();
		ArrayList<Type_ListFilter1> l = new ArrayList<>();
		for (Type data : list) {
{	
Type_ListFilter1 dummy = new Type_ListFilter1();
			dummy.setId(data.getId());
  dummy.setType_name(data.getType_name());
	l.add(dummy);
} 
} 		
return l;}



 public   List<Type_ListFilter1>   getlistbuilderparam( ) {
	List<Type> list= Repository.findAll();
		ArrayList<Type_ListFilter1> l = new ArrayList<>();
		for (Type data : list) {
{	
Type_ListFilter1 dummy = new Type_ListFilter1();
			dummy.setId(data.getId());
  dummy.setType_name(data.getType_name());
	l.add(dummy);
} 
} 		
return l;}
}