package com.realnet.vpspack.Services;
import java.util.*;
import com.realnet.vpspack.Repository.ReferrerRepository;
import com.realnet.vpspack.Entity.Referrer;

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

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

@Service
 public class Referrer_ListFilter1Service {
@Autowired
private ReferrerRepository Repository;




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

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



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

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