package com.realnet.basicp1.Services;
import java.util.*;
import com.realnet.basicp1.Repository.ContryRepository;
import com.realnet.basicp1.Entity.Contry;

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

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

@Service
 public class Contry_ListFilter1Service {
@Autowired
private ContryRepository Repository;




 public   List<Contry_ListFilter1>   getlistbuilder() {
	List<Contry> list= Repository.findAll();
		ArrayList<Contry_ListFilter1> l = new ArrayList<>();
		for (Contry data : list) {
Boolean isActive = data.getActive();

				if (Boolean.TRUE.equals(isActive)) {{	
Contry_ListFilter1 dummy = new Contry_ListFilter1();
			dummy.setId(data.getId());
  dummy.setName(data.getName());
  dummy.setDescription(data.getDescription());
	l.add(dummy);
}} 
} 		
return l;}



 public   List<Contry_ListFilter1>   getlistbuilderparam( ) {
	List<Contry> list= Repository.findAll();
		ArrayList<Contry_ListFilter1> l = new ArrayList<>();
		for (Contry data : list) {
Boolean isActive = data.getActive();

				if (Boolean.TRUE.equals(isActive)) {{	
Contry_ListFilter1 dummy = new Contry_ListFilter1();
			dummy.setId(data.getId());
  dummy.setName(data.getName());
  dummy.setDescription(data.getDescription());
	l.add(dummy);
}} 
} 		
return l;}
}