package com.realnet.taxi_rental.Services;
import java.util.*;
import com.realnet.taxi_rental.Repository.Custom_settingRepository;
import com.realnet.taxi_rental.Entity.Custom_setting;

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

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

@Service
 public class Custom_setting_ListFilter1Service {
@Autowired
private Custom_settingRepository Repository;




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

				if (isactive) {{	
Custom_setting_ListFilter1 dummy = new Custom_setting_ListFilter1();
			dummy.setId(data.getId());
  dummy.setName(data.getName());
  dummy.setDescription(data.getDescription());
  dummy.setYound_driver_surcharge(data.getYound_driver_surcharge());
  dummy.setFree_km(data.getFree_km());
  dummy.setExtra_km_charge(data.getExtra_km_charge());
  dummy.setGst_rate(data.getGst_rate());
  dummy.setPst_rate(data.getPst_rate());
  dummy.setAge_threshold(data.getAge_threshold());
	l.add(dummy);
}} 
} 		
return l;}



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

				if (isactive) {{	
Custom_setting_ListFilter1 dummy = new Custom_setting_ListFilter1();
			dummy.setId(data.getId());
  dummy.setName(data.getName());
  dummy.setDescription(data.getDescription());
  dummy.setYound_driver_surcharge(data.getYound_driver_surcharge());
  dummy.setFree_km(data.getFree_km());
  dummy.setExtra_km_charge(data.getExtra_km_charge());
  dummy.setGst_rate(data.getGst_rate());
  dummy.setPst_rate(data.getPst_rate());
  dummy.setAge_threshold(data.getAge_threshold());
	l.add(dummy);
}} 
} 		
return l;}
}