public static Offer fromVO(OfferVO vo) { Offer entity = new Offer(); BeanUtils.copyProperties(vo, entity, "delegation"); if (vo.getDelegation() != null) { entity.setDelegation(Delegation.fromVO(vo.getDelegation())); } return entity; }
public OfferVO toVO() { OfferVO vo = new OfferVO(); BeanUtils.copyProperties(this, vo, "delegation"); if (delegation != null) { vo.setDelegation(delegation.toVO()); } return vo; }