package com.realnet.founder's_friend.Services;
import java.util.*;
import com.realnet.basic.Repository.ExpensesRepository;
import com.realnet.basic.Entity.Expenses;

import com.realnet.founder's_friend.Entity.Expenses_ListFilter1;
import java.util.List;

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

@Service
 public class Expenses_ListFilter1Service {
@Autowired
private ExpensesRepository Repository;




 public   List<Expenses_ListFilter1>   getlistbuilder() {
	List<Expenses> list= Repository.findAll();
		ArrayList<Expenses_ListFilter1> l = new ArrayList<>();
		for (Expenses data : list) {
{	
Expenses_ListFilter1 dummy = new Expenses_ListFilter1();
			dummy.setId(data.getId());
  dummy.setAmount(data.getAmount());
	l.add(dummy);
} 
} 		
return l;}



 public   List<Expenses_ListFilter1>   getlistbuilderparam( ) {
	List<Expenses> list= Repository.findAll();
		ArrayList<Expenses_ListFilter1> l = new ArrayList<>();
		for (Expenses data : list) {
{	
Expenses_ListFilter1 dummy = new Expenses_ListFilter1();
			dummy.setId(data.getId());
  dummy.setAmount(data.getAmount());
	l.add(dummy);
} 
} 		
return l;}
}