public UserActivity newInstance(IUserActivity userActivityObject) {
    if (userActivityObject == null) return null;
    if (userActivityObject instanceof UserActivity) return (UserActivity) userActivityObject;

    UserTypPrx activityUsr = null;
    TripOfferTypPrx activityTrip = null;
    uclm.esi.cardroid.data.zerocice.ActivityType userActivityType =
        uclm.esi.cardroid.data.zerocice.ActivityType.valueOf(userActivityObject.getType().name());
    long timeStamp = userActivityObject.getTimeStamp().getTime();

    return new UserActivity(activityUsr, activityTrip, userActivityType, timeStamp);
  }
 public void setType(ActivityType activityType) {
   setUserActivityType(uclm.esi.cardroid.data.zerocice.ActivityType.valueOf(activityType.name()));
 }