package com.realnet.basicp1.Services;
import java.util.*;
import com.realnet.basicp1.Repository.CountryRepository;
import com.realnet.basicp1.Entity.Country;

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

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

@Service
 public class Country_ListFilter1Service {
@Autowired
private CountryRepository Repository;




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

				if (isactive) {{	
Country_ListFilter1 dummy = new Country_ListFilter1();
			dummy.setId(data.getId());
  dummy.setCountry_name(data.getCountry_name());
	l.add(dummy);
}} 
} 		
return l;}



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

				if (isactive) {{	
Country_ListFilter1 dummy = new Country_ListFilter1();
			dummy.setId(data.getId());
  dummy.setCountry_name(data.getCountry_name());
	l.add(dummy);
}} 
} 		
return l;}
}