entity, dao, logic java code