package com.realnet.vpspack.Services;
import java.util.*;
import com.realnet.vpspack.Repository.Visa_entryRepository;
import com.realnet.vpspack.Entity.Visa_entry;

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

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

@Service
 public class Visa_entry_ListFilter1Service {
@Autowired
private Visa_entryRepository Repository;




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

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



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

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