@Override
  public HRProject updateImpl(com.liferay.hr.model.HRProject hrProject, boolean merge)
      throws SystemException {
    hrProject = toUnwrappedModel(hrProject);

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.update(session, hrProject, merge);

      hrProject.setNew(false);
    } catch (Exception e) {
      throw processException(e);
    } finally {
      closeSession(session);
    }

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);

    EntityCacheUtil.putResult(
        HRProjectModelImpl.ENTITY_CACHE_ENABLED,
        HRProjectImpl.class,
        hrProject.getPrimaryKey(),
        hrProject);

    return hrProject;
  }
  /**
   * Creates a new h r project with the primary key. Does not add the h r project to the database.
   *
   * @param hrProjectId the primary key for the new h r project
   * @return the new h r project
   */
  public HRProject create(long hrProjectId) {
    HRProject hrProject = new HRProjectImpl();

    hrProject.setNew(true);
    hrProject.setPrimaryKey(hrProjectId);

    return hrProject;
  }