package com.realnet.basicp1.Services;
import java.util.*;
import com.realnet.basicp1.Repository.TestbRepository;
import com.realnet.basicp1.Entity.Testb;

import com.realnet.basicp1.Entity.Testb_ListFilter1;
import java.util.List;

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

@Service
 public class Testb_ListFilter1Service {
@Autowired
private TestbRepository Repository;




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

				if (isactive) {{	
Testb_ListFilter1 dummy = new Testb_ListFilter1();
			dummy.setId(data.getId());
  dummy.setSname(data.getSname());
	l.add(dummy);
}} 
} 		
return l;}



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

				if (isactive) {{	
Testb_ListFilter1 dummy = new Testb_ListFilter1();
			dummy.setId(data.getId());
  dummy.setSname(data.getSname());
	l.add(dummy);
}} 
} 		
return l;}
}