package com.realnet.basicp1.Services;
import java.util.*;
import com.realnet.basicp1.Repository.ListaRepository;
import com.realnet.basicp1.Entity.Lista;

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

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

@Service
 public class Lista_ListFilter1Service {
@Autowired
private ListaRepository Repository;




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

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



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

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