package com.realnet.vpspack.Services;
import java.util.*;
import com.realnet.vpspack.Repository.GenderRepository;
import com.realnet.vpspack.Entity.Gender;

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

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

@Service
 public class Gender_ListFilter1Service {
@Autowired
private GenderRepository Repository;




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

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



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

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