ɾσʔλϗϧμΫϥεͷఆٛ ɾฦΓͷܕΛ10+0 ී௨ͷ+BWBΦϒδΣΫτ Ͱࣄલʹఆٛ͢Δඞཁ͕͋Δ ɾ+BWBͩͱఆٛ͢Δͷ͕ͪΐͬͱΊΜͲ͍͘͞ public class GetRestaurantResponse { private long restaurantId; private String restaurantName; public long getRestaurantId() { return this.restaurantId; } public String getRestaurantName() { return this.restaurantName; } }
ɾ$MBTT%FMFHBUJPO ɾΠϯλϑΣʔεͷ࣮ΛଞͷΫϥεʹҠৡͰ͖Δ ɾQSPQFSUZΛࡉ͔͘JOUFSGBDFԽ͓͚ͯ͠ɺฦΓΫϥεΛࡉ͔͘ఆٛՄೳʹ data class GetReviewResponse( private val review: IReview, private val restaurant: IRestaurant, private val user: IUser ) : IReview by review, IRestaurant by restaurant, IUser by user { // ෳͷinterfaceͰఆ͕͔ٛͿͬͯΔͱ͖͚ͩ໌ࣔతʹࢦఆ override val userId: Int = this.user.userId }