package com.realnet.orderestimate.Services;
import java.util.*;
import com.realnet.orderestimate.Repository.TypeRepository;
import com.realnet.orderestimate.Entity.Type;

import com.realnet.orderestimate.Entity.Type_ListFilter1;
import java.util.List;

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

@Service
 public class Type_ListFilter1Service {
@Autowired
private TypeRepository Repository;




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

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



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

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