setMessage(entry.getTextBody());
// destination selection
String destinationEmail = entry.getDestinationEmail();
String destinationPersonalName = entry.getDestinationPersonalName();
UserSet destinationUserSet = entry.getDestinationUserSet();
User destinationUser = entry.getDestinationUser();
if (destinationUser != null){
destinationUserSet = null;
destinationEmail = null;
destinationPersonalName = null;
setDestinationSelection(2);
} else if (destinationUserSet != null){
destinationUser = null;
destinationEmail = null;
destinationPersonalName = null;
setDestinationSelection(1);
} else if (destinationEmail != null){
destinationUserSet = null;
destinationUser = null;
setDestinationSelection(3);
} else { // default: nothing selected
destinationUserSet = null;
destinationUser = null;
destinationEmail = null;
destinationPersonalName = null;
setDestinationSelection(-1);
}
setToEmail(destinationEmail);
setToPersonalName(destinationPersonalName);
setUserId(destinationUser == null ? -1 : destinationUser.getId());
setUserSetId(destinationUserSet == null ? -1 : destinationUserSet.getId());
setGroupId(entry.getGroup().getId());
}