enFaust / MediaServer

Task for EPAM
0 stars 0 forks source link

why does your dao interface return query? this is really strange #20

Closed vatolinrp closed 6 years ago

vatolinrp commented 6 years ago

https://github.com/AliaksandrFiodarau3/MediaServer/blob/073c3c1cf3c4638d739c66df2d45ddea909b78c4/dao/src/main/java/com/epam/mediaserver/dao/ArtistDao.java#L19

vatolinrp commented 6 years ago

it does not look good. please explain.

enFaust commented 6 years ago

These methods need DAO for call SQL query. I can call the only fields with a query. I see it practise in manuals.

vatolinrp commented 6 years ago

could you please give me a link to one of these manuals? This doesn't look right. Will you need this method outside DAO ? I guess - not. So what is the reason for exposing it?

enFaust commented 6 years ago

I solved this problem. https://github.com/AliaksandrFiodarau3/MediaServer/pull/29/commits/4bd4549d4d63c6909313cfbc23b0f04749bdb365

vatolinrp commented 6 years ago

looks better.