package com.realnet.vpspack.Services;
import java.util.*;
import com.realnet.vpspack.Repository.Visa_durationRepository;
import com.realnet.vpspack.Entity.Visa_duration;

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

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

@Service
 public class Visa_duration_ListFilter1Service {
@Autowired
private Visa_durationRepository Repository;




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

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



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

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