public ActivityCommentJSON(UserProfile userProfile, String message, Activity activity) {
   this.setCreated(new Date());
   this.setOwnerId(userProfile.getUserId());
   this.setOwnerName(userProfile.getFullName());
   this.setMessage(message);
   this.setActivityId(activity.getId());
 }
 @Override
 public boolean isImIdInUse(String imId, Integer userId) {
   UserProfile userProfile = getUserProfileByImId(imId);
   if (userProfile != null && !userProfile.getUserId().equals(userId.toString())) {
     return true;
   }
   return false;
 }
 @Override
 public Integer getUserIdByImId(String imId) {
   UserProfile userProfile = getUserProfileByImId(imId);
   if (userProfile != null) {
     return Integer.valueOf(userProfile.getUserId());
   }
   return null;
 }