package com.realnet.taxi_rental.Services;
import java.util.*;
import com.realnet.taxi_rental.Repository.FeatureRepository;
import com.realnet.taxi_rental.Entity.Feature;

import com.realnet.taxi_rental.Entity.Feature_ListFilter1;
import java.util.List;

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

@Service
 public class Feature_ListFilter1Service {
@Autowired
private FeatureRepository Repository;




 public   List<Feature_ListFilter1>   getlistbuilder() {
	List<Feature> list= Repository.findAll();
		ArrayList<Feature_ListFilter1> l = new ArrayList<>();
		for (Feature data : list) {
boolean isactive = data.getActive();

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



 public   List<Feature_ListFilter1>   getlistbuilderparam( ) {
	List<Feature> list= Repository.findAll();
		ArrayList<Feature_ListFilter1> l = new ArrayList<>();
		for (Feature data : list) {
boolean isactive = data.getActive();

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