Skip to content
Snippets Groups Projects
Commit 60664d07 authored by Thomas Carrara's avatar Thomas Carrara
Browse files

faut que je poule

parent bd1a7261
Branches
No related tags found
No related merge requests found
package com.tpKotlin.glhf.tpkotlin.dao
interface ImageAccessorDao {
fun getAll():List<Any>
fun getImg(nom:String): Any
fun getAll(listeImg: List<Any>) : List<Any>
}
\ No newline at end of file
......@@ -4,11 +4,9 @@ import com.tpKotlin.glhf.tpkotlin.entity.FavDir
class ImageAccessorDaoImpl : ImageAccessorDao {
override fun getAll(): List<Any> {
var imagesFav = FavDir.getAll()
override fun getImg(nom:String) {
Thread.sleep(1000L) //celui qui retire ça est maudit pendant 3 generation (la sienne incluse)
Thread.sleep(imagesFav.size.toLong() * 3000L) //celui qui retire ça est maudit pendant 3 generation (la sienne incluse)
return imagesFav
return LimageAssocieeAuNomDansLaPseudoBase
}
}
\ No newline at end of file
package com.tpKotlin.glhf.tpkotlin.service
interface DossierFavService {
fun getAllImagesFromFav(): List<Any>
fun getAllImagesFromFavFASTER(): List<Any>
}
\ No newline at end of file
package com.tpKotlin.glhf.tpkotlin.service
import org.springframework.beans.factory.annotation.Autowired
import com.tpKotlin.glhf.tpkotlin.dao.ImageAccessorDao
import kotlinx.coroutines.*
class DossierFavServiceImpl: DossierFavService {
@Autowired
lateinit var imgDao: ImageAccessorDao
//Truc lent pour l'exo 3
override fun getAllImagesFromFav(): List<Any> {
return imgDao.getAll()
}
//Truc rapide pour le 4
override fun getAllImagesFromFavFASTER(): List<Any> {
GlobalScope.launch {
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment