| 
				
			 | 
			
			
				@@ -3,15 +3,12 @@ package fr.natan.akkastreamfileprocessingapi.service 
			 | 
		
	
		
			
			| 
				3
			 | 
			
				3
			 | 
			
			
				 import akka.NotUsed 
			 | 
		
	
		
			
			| 
				4
			 | 
			
				4
			 | 
			
			
				 import akka.stream.scaladsl.{Flow, Sink, Source} 
			 | 
		
	
		
			
			| 
				5
			 | 
			
				5
			 | 
			
			
				 import com.typesafe.scalalogging.slf4j.Logger 
			 | 
		
	
		
			
			| 
				6
			 | 
			
				
			 | 
			
			
				-import fr.natan.akkastreamfileprocessingapi.businessexceptions.TvSerieNotFoundException 
			 | 
		
	
		
			
			| 
				7
			 | 
			
				6
			 | 
			
			
				 import fr.natan.akkastreamfileprocessingapi.models.ModelsAndJsonMap.Person 
			 | 
		
	
		
			
			| 
				8
			 | 
			
				7
			 | 
			
			
				 import fr.natan.akkastreamfileprocessingapi.models.ModelsBuilder.buildPersonModel 
			 | 
		
	
		
			
			| 
				9
			 | 
			
				8
			 | 
			
			
				 import fr.natan.akkastreamfileprocessingapi.service.AkkaStreamComponents.{actorSystem, buildAndValidateSource} 
			 | 
		
	
		
			
			| 
				10
			 | 
			
				9
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				11
			 | 
			
				10
			 | 
			
			
				 import java.io.File 
			 | 
		
	
		
			
			| 
				12
			 | 
			
				
			 | 
			
			
				-import scala.concurrent.ExecutionContext.Implicits.global 
			 | 
		
	
		
			
			| 
				13
			 | 
			
				11
			 | 
			
			
				 import scala.concurrent.Future 
			 | 
		
	
		
			
			| 
				14
			 | 
			
				
			 | 
			
			
				-import scala.util.{Failure, Success} 
			 | 
		
	
		
			
			| 
				15
			 | 
			
				12
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				16
			 | 
			
				13
			 | 
			
			
				 object UtilitiesClass { 
			 | 
		
	
		
			
			| 
				17
			 | 
			
				14
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -72,12 +69,6 @@ object UtilitiesClass { 
			 | 
		
	
		
			
			| 
				72
			 | 
			
				69
			 | 
			
			
				       .map(row => row.get("tconst")) 
			 | 
		
	
		
			
			| 
				73
			 | 
			
				70
			 | 
			
			
				       .runWith(Sink.head) 
			 | 
		
	
		
			
			| 
				74
			 | 
			
				71
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				75
			 | 
			
				
			 | 
			
			
				-    tvSerieIdFuture.onComplete({ 
			 | 
		
	
		
			
			| 
				76
			 | 
			
				
			 | 
			
			
				-      case Failure(noSuchElementException: NoSuchElementException) => throw new TvSerieNotFoundException() 
			 | 
		
	
		
			
			| 
				77
			 | 
			
				
			 | 
			
			
				-      case Failure(exception: Exception) => throw new RuntimeException() 
			 | 
		
	
		
			
			| 
				78
			 | 
			
				
			 | 
			
			
				-      case Success(value) => logger.info(s"$value") 
			 | 
		
	
		
			
			| 
				79
			 | 
			
				
			 | 
			
			
				-    }) 
			 | 
		
	
		
			
			| 
				80
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				81
			 | 
			
				72
			 | 
			
			
				     tvSerieIdFuture 
			 | 
		
	
		
			
			| 
				82
			 | 
			
				73
			 | 
			
			
				   } 
			 | 
		
	
		
			
			| 
				83
			 | 
			
				74
			 | 
			
			
				  
			 |