package com.realnet.vpspack.Services;
import java.util.*;
import com.realnet.vpspack.Repository.Visa_statusRepository;
import com.realnet.vpspack.Entity.Visa_status;

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

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

@Service
 public class Visa_status_ListFilter1Service {
@Autowired
private Visa_statusRepository Repository;




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

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



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

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