package com.realnet.vpspack.Services;
import java.util.*;
import com.realnet.vpspack.Repository.NationalityRepository;
import com.realnet.vpspack.Entity.Nationality;

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

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

@Service
 public class Nationality_ListFilter1Service {
@Autowired
private NationalityRepository Repository;




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

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



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

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