package com.realnet.basicp1.Services;
import java.util.*;
import com.realnet.basicp1.Repository.Duration_typeRepository;
import com.realnet.basicp1.Entity.Duration_type;

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

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

@Service
 public class Duration_type_ListFilter1Service {
@Autowired
private Duration_typeRepository Repository;




 public   List<Duration_type_ListFilter1>   getlistbuilder() {
	List<Duration_type> list= Repository.findAll();
		ArrayList<Duration_type_ListFilter1> l = new ArrayList<>();
		for (Duration_type data : list) {
{	
Duration_type_ListFilter1 dummy = new Duration_type_ListFilter1();
			dummy.setId(data.getId());
  dummy.setDuration(data.getDuration());
	l.add(dummy);
} 
} 		
return l;}



 public   List<Duration_type_ListFilter1>   getlistbuilderparam( ) {
	List<Duration_type> list= Repository.findAll();
		ArrayList<Duration_type_ListFilter1> l = new ArrayList<>();
		for (Duration_type data : list) {
{	
Duration_type_ListFilter1 dummy = new Duration_type_ListFilter1();
			dummy.setId(data.getId());
  dummy.setDuration(data.getDuration());
	l.add(dummy);
} 
} 		
return l;}
}