package com.realnet.basicp1.Services;
import java.util.*;
import com.realnet.basicp1.Repository.CategoryRepository;
import com.realnet.basicp1.Entity.Category;

import com.realnet.basicp1.Entity.Category_ListFilter1;
import java.util.List;

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

@Service
 public class Category_ListFilter1Service {
@Autowired
private CategoryRepository Repository;




 public   List<Category_ListFilter1>   getlistbuilder() {
	List<Category> list= Repository.findAll();
		ArrayList<Category_ListFilter1> l = new ArrayList<>();
		for (Category data : list) {
{	
Category_ListFilter1 dummy = new Category_ListFilter1();
			dummy.setId(data.getId());
  dummy.setCategory(data.getCategory());
	l.add(dummy);
} 
} 		
return l;}



 public   List<Category_ListFilter1>   getlistbuilderparam( ) {
	List<Category> list= Repository.findAll();
		ArrayList<Category_ListFilter1> l = new ArrayList<>();
		for (Category data : list) {
{	
Category_ListFilter1 dummy = new Category_ListFilter1();
			dummy.setId(data.getId());
  dummy.setCategory(data.getCategory());
	l.add(dummy);
} 
} 		
return l;}
}