public ViewListTitleCompetencies updateImpl(
      larion.progate.cds.model.ViewListTitleCompetencies viewListTitleCompetencies, boolean merge)
      throws SystemException {
    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.update(session, viewListTitleCompetencies, merge);

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);

    EntityCacheUtil.putResult(
        ViewListTitleCompetenciesModelImpl.ENTITY_CACHE_ENABLED,
        ViewListTitleCompetenciesImpl.class,
        viewListTitleCompetencies.getPrimaryKey(),
        viewListTitleCompetencies);

    return viewListTitleCompetencies;
  }
  protected ViewListTitleCompetencies removeImpl(
      ViewListTitleCompetencies viewListTitleCompetencies) throws SystemException {
    Session session = null;

    try {
      session = openSession();

      if (viewListTitleCompetencies.isCachedModel() || BatchSessionUtil.isEnabled()) {
        Object staleObject =
            session.get(
                ViewListTitleCompetenciesImpl.class, viewListTitleCompetencies.getPrimaryKeyObj());

        if (staleObject != null) {
          session.evict(staleObject);
        }
      }

      session.delete(viewListTitleCompetencies);

      session.flush();
    } catch (Exception e) {
      throw processException(e);
    } finally {
      closeSession(session);
    }

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);

    EntityCacheUtil.removeResult(
        ViewListTitleCompetenciesModelImpl.ENTITY_CACHE_ENABLED,
        ViewListTitleCompetenciesImpl.class,
        viewListTitleCompetencies.getPrimaryKey());

    return viewListTitleCompetencies;
  }
  public ViewListTitleCompetencies create(String id) {
    ViewListTitleCompetencies viewListTitleCompetencies = new ViewListTitleCompetenciesImpl();

    viewListTitleCompetencies.setNew(true);
    viewListTitleCompetencies.setPrimaryKey(id);

    return viewListTitleCompetencies;
  }
 public void cacheResult(List<ViewListTitleCompetencies> viewListTitleCompetencieses) {
   for (ViewListTitleCompetencies viewListTitleCompetencies : viewListTitleCompetencieses) {
     if (EntityCacheUtil.getResult(
             ViewListTitleCompetenciesModelImpl.ENTITY_CACHE_ENABLED,
             ViewListTitleCompetenciesImpl.class,
             viewListTitleCompetencies.getPrimaryKey(),
             this)
         == null) {
       cacheResult(viewListTitleCompetencies);
     }
   }
 }
 public void cacheResult(ViewListTitleCompetencies viewListTitleCompetencies) {
   EntityCacheUtil.putResult(
       ViewListTitleCompetenciesModelImpl.ENTITY_CACHE_ENABLED,
       ViewListTitleCompetenciesImpl.class,
       viewListTitleCompetencies.getPrimaryKey(),
       viewListTitleCompetencies);
 }
  public ViewListTitleCompetencies update(
      ViewListTitleCompetencies viewListTitleCompetencies, boolean merge) throws SystemException {
    boolean isNew = viewListTitleCompetencies.isNew();

    for (ModelListener<ViewListTitleCompetencies> listener : listeners) {
      if (isNew) {
        listener.onBeforeCreate(viewListTitleCompetencies);
      } else {
        listener.onBeforeUpdate(viewListTitleCompetencies);
      }
    }

    viewListTitleCompetencies = updateImpl(viewListTitleCompetencies, merge);

    for (ModelListener<ViewListTitleCompetencies> listener : listeners) {
      if (isNew) {
        listener.onAfterCreate(viewListTitleCompetencies);
      } else {
        listener.onAfterUpdate(viewListTitleCompetencies);
      }
    }

    return viewListTitleCompetencies;
  }