*/
public ObjectInstanceSO translateTo(ObjectInstance obj) {
logger.debug("translate to: " + obj);
ObjectInstanceSO vo = new ObjectInstanceSO();
vo.setId(obj.getId());
vo.setCampaignId(obj.getCampaign().getId());
if(obj.getObjectTemplate() != null) {
vo.setObjectTemplateId(obj.getObjectTemplate().getId());
}
if(obj.getOwner() != null) {
vo.setParticipantId(obj.getOwner().getId());
}
Set<String> data = new HashSet<String>();
for(ObjectData objectData : obj.getData().values()) {
data.add(objectData.getId());
}
vo.setData(data);
return vo;
}