package com.realnet.basic1.Services;
import java.util.*;
import com.realnet.basic1.Repository.TestlistRepository;
import com.realnet.basic1.Entity.Testlist;

import com.realnet.basic1.Entity.Testlist_ListFilter1;
import java.util.List;

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

@Service
 public class Testlist_ListFilter1Service {
@Autowired
private TestlistRepository Repository;




 public   List<Testlist_ListFilter1>   getlistbuilder() {
	List<Testlist> list= Repository.findAll();
		ArrayList<Testlist_ListFilter1> l = new ArrayList<>();
		for (Testlist data : list) {
boolean isactive = data.getActive();

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



 public   List<Testlist_ListFilter1>   getlistbuilderparam( ) {
	List<Testlist> list= Repository.findAll();
		ArrayList<Testlist_ListFilter1> l = new ArrayList<>();
		for (Testlist data : list) {
boolean isactive = data.getActive();

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