@Override
  public UserTrackerPath updateImpl(UserTrackerPath userTrackerPath) {
    userTrackerPath = toUnwrappedModel(userTrackerPath);

    boolean isNew = userTrackerPath.isNew();

    UserTrackerPathModelImpl userTrackerPathModelImpl = (UserTrackerPathModelImpl) userTrackerPath;

    Session session = null;

    try {
      session = openSession();

      if (userTrackerPath.isNew()) {
        session.save(userTrackerPath);

        userTrackerPath.setNew(false);
      } else {
        userTrackerPath = (UserTrackerPath) session.merge(userTrackerPath);
      }
    } catch (Exception e) {
      throw processException(e);
    } finally {
      closeSession(session);
    }

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

    if (isNew || !UserTrackerPathModelImpl.COLUMN_BITMASK_ENABLED) {
      FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
    } else {
      if ((userTrackerPathModelImpl.getColumnBitmask()
              & FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERTRACKERID.getColumnBitmask())
          != 0) {
        Object[] args = new Object[] {userTrackerPathModelImpl.getOriginalUserTrackerId()};

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERTRACKERID, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERTRACKERID, args);

        args = new Object[] {userTrackerPathModelImpl.getUserTrackerId()};

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERTRACKERID, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERTRACKERID, args);
      }
    }

    EntityCacheUtil.putResult(
        UserTrackerPathModelImpl.ENTITY_CACHE_ENABLED,
        UserTrackerPathImpl.class,
        userTrackerPath.getPrimaryKey(),
        userTrackerPath,
        false);

    userTrackerPath.resetOriginalValues();

    return userTrackerPath;
  }
  @Override
  public void resetOriginalValues() {
    UserTrackerPathModelImpl userTrackerPathModelImpl = this;

    userTrackerPathModelImpl._originalUserTrackerId = userTrackerPathModelImpl._userTrackerId;

    userTrackerPathModelImpl._setOriginalUserTrackerId = false;

    userTrackerPathModelImpl._columnBitmask = 0;
  }