public ActivityEntity convertTo(Activity source, ActivityEntity destination) {
ActivityEntity result = null;
if (source instanceof Service) {
ServiceEntity serviceEntity = new ServiceEntity();
serviceEntity.setId(source.getId());
serviceEntity.setDescription(((Service) source).getDescription());
serviceEntity.setElapsedTime(source.getElapsedTime());
serviceEntity.setNote(source.getNote());
serviceEntity.setTotal(source.getTotal());
result = serviceEntity;
}
if (source instanceof DetailReplacement) {