package com.realnet.vpspack.Services;
import java.util.*;
import com.realnet.vpspack.Repository.SupplierRepository;
import com.realnet.vpspack.Entity.Supplier;

import com.realnet.vpspack.Entity.Supplier_ListFilter1;
import java.util.List;

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

@Service
 public class Supplier_ListFilter1Service {
@Autowired
private SupplierRepository Repository;




 public   List<Supplier_ListFilter1>   getlistbuilder() {
	List<Supplier> list= Repository.findAll();
		ArrayList<Supplier_ListFilter1> l = new ArrayList<>();
		for (Supplier data : list) {
boolean isactive = data.isActive();

				if (isactive) {{	
Supplier_ListFilter1 dummy = new Supplier_ListFilter1();
			dummy.setId(data.getId());
  dummy.setName(data.getName());
	l.add(dummy);
}} 
} 		
return l;}



 public   List<Supplier_ListFilter1>   getlistbuilderparam( ) {
	List<Supplier> list= Repository.findAll();
		ArrayList<Supplier_ListFilter1> l = new ArrayList<>();
		for (Supplier data : list) {
boolean isactive = data.isActive();

				if (isactive) {{	
Supplier_ListFilter1 dummy = new Supplier_ListFilter1();
			dummy.setId(data.getId());
  dummy.setName(data.getName());
	l.add(dummy);
}} 
} 		
return l;}
}