protected DebateItemReference removeImpl(DebateItemReference debateItemReference)
      throws SystemException {
    Session session = null;

    try {
      session = openSession();

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

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

      session.delete(debateItemReference);

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);

    EntityCacheUtil.removeResult(
        DebateItemReferenceModelImpl.ENTITY_CACHE_ENABLED,
        DebateItemReferenceImpl.class,
        debateItemReference.getPrimaryKey());

    return debateItemReference;
  }
  @Override
  protected HROffice removeImpl(HROffice hrOffice) throws SystemException {
    hrOffice = toUnwrappedModel(hrOffice);

    try {
      clearHRHolidaies.clear(hrOffice.getPrimaryKey());
    } catch (Exception e) {
      throw processException(e);
    } finally {
      FinderCacheUtil.clearCache(HROfficeModelImpl.MAPPING_TABLE_HRHOLIDAYS_HROFFICES_NAME);
    }

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.delete(session, hrOffice);
    } catch (Exception e) {
      throw processException(e);
    } finally {
      closeSession(session);
    }

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);

    EntityCacheUtil.removeResult(
        HROfficeModelImpl.ENTITY_CACHE_ENABLED, HROfficeImpl.class, hrOffice.getPrimaryKey());

    return hrOffice;
  }
  public ProGateMenuView updateImpl(
      larion.progate.model.ProGateMenuView proGateMenuView, boolean merge) throws SystemException {
    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.update(session, proGateMenuView, merge);

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);

    EntityCacheUtil.putResult(
        ProGateMenuViewModelImpl.ENTITY_CACHE_ENABLED,
        ProGateMenuViewImpl.class,
        proGateMenuView.getPrimaryKey(),
        proGateMenuView);

    return proGateMenuView;
  }
  protected ProGateMenuView removeImpl(ProGateMenuView proGateMenuView) throws SystemException {
    Session session = null;

    try {
      session = openSession();

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

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

      session.delete(proGateMenuView);

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);

    EntityCacheUtil.removeResult(
        ProGateMenuViewModelImpl.ENTITY_CACHE_ENABLED,
        ProGateMenuViewImpl.class,
        proGateMenuView.getPrimaryKey());

    return proGateMenuView;
  }
  public DebateItemReference updateImpl(
      com.ext.portlet.debaterevision.model.DebateItemReference debateItemReference, boolean merge)
      throws SystemException {
    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.update(session, debateItemReference, merge);

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);

    EntityCacheUtil.putResult(
        DebateItemReferenceModelImpl.ENTITY_CACHE_ENABLED,
        DebateItemReferenceImpl.class,
        debateItemReference.getPrimaryKey(),
        debateItemReference);

    return debateItemReference;
  }
  @Override
  public iProject updateImpl(com.asu.poly.iProjects.model.iProject iProject, boolean merge)
      throws SystemException {
    iProject = toUnwrappedModel(iProject);

    boolean isNew = iProject.isNew();

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.update(session, iProject, merge);

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

    if (isNew) {
      FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
    }

    EntityCacheUtil.putResult(
        iProjectModelImpl.ENTITY_CACHE_ENABLED,
        iProjectImpl.class,
        iProject.getPrimaryKey(),
        iProject);

    return iProject;
  }
  @Override
  protected ExpandoRow removeImpl(ExpandoRow expandoRow) throws SystemException {
    expandoRow = toUnwrappedModel(expandoRow);

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.delete(session, expandoRow);
    } catch (Exception e) {
      throw processException(e);
    } finally {
      closeSession(session);
    }

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);

    ExpandoRowModelImpl expandoRowModelImpl = (ExpandoRowModelImpl) expandoRow;

    FinderCacheUtil.removeResult(
        FINDER_PATH_FETCH_BY_T_C,
        new Object[] {
          Long.valueOf(expandoRowModelImpl.getTableId()),
          Long.valueOf(expandoRowModelImpl.getClassPK())
        });

    EntityCacheUtil.removeResult(
        ExpandoRowModelImpl.ENTITY_CACHE_ENABLED, ExpandoRowImpl.class, expandoRow.getPrimaryKey());

    return expandoRow;
  }
  @Override
  public SocialEquityHistory updateImpl(
      com.liferay.portlet.social.model.SocialEquityHistory socialEquityHistory, boolean merge)
      throws SystemException {
    socialEquityHistory = toUnwrappedModel(socialEquityHistory);

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.update(session, socialEquityHistory, merge);

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);

    EntityCacheUtil.putResult(
        SocialEquityHistoryModelImpl.ENTITY_CACHE_ENABLED,
        SocialEquityHistoryImpl.class,
        socialEquityHistory.getPrimaryKey(),
        socialEquityHistory);

    return socialEquityHistory;
  }
  @Override
  protected HRProject removeImpl(HRProject hrProject) throws SystemException {
    hrProject = toUnwrappedModel(hrProject);

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.delete(session, hrProject);
    } catch (Exception e) {
      throw processException(e);
    } finally {
      closeSession(session);
    }

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);

    FinderCacheUtil.removeResult(FINDER_PATH_FIND_ALL, FINDER_ARGS_EMPTY);

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

    return hrProject;
  }
  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;
  }
  @Override
  protected SocialEquityHistory removeImpl(SocialEquityHistory socialEquityHistory)
      throws SystemException {
    socialEquityHistory = toUnwrappedModel(socialEquityHistory);

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.delete(session, socialEquityHistory);
    } catch (Exception e) {
      throw processException(e);
    } finally {
      closeSession(session);
    }

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);

    EntityCacheUtil.removeResult(
        SocialEquityHistoryModelImpl.ENTITY_CACHE_ENABLED,
        SocialEquityHistoryImpl.class,
        socialEquityHistory.getPrimaryKey());

    return socialEquityHistory;
  }
  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;
  }
  @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;
  }
  @Override
  protected JIRAChangeItem removeImpl(JIRAChangeItem jiraChangeItem) throws SystemException {
    jiraChangeItem = toUnwrappedModel(jiraChangeItem);

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.delete(session, jiraChangeItem);
    } catch (Exception e) {
      throw processException(e);
    } finally {
      closeSession(session);
    }

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);

    FinderCacheUtil.removeResult(FINDER_PATH_FIND_ALL, FINDER_ARGS_EMPTY);

    EntityCacheUtil.removeResult(
        JIRAChangeItemModelImpl.ENTITY_CACHE_ENABLED,
        JIRAChangeItemImpl.class,
        jiraChangeItem.getPrimaryKey());

    return jiraChangeItem;
  }
  @Override
  public JIRAChangeItem updateImpl(
      com.liferay.socialcoding.model.JIRAChangeItem jiraChangeItem, boolean merge)
      throws SystemException {
    jiraChangeItem = toUnwrappedModel(jiraChangeItem);

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.update(session, jiraChangeItem, merge);

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);

    EntityCacheUtil.putResult(
        JIRAChangeItemModelImpl.ENTITY_CACHE_ENABLED,
        JIRAChangeItemImpl.class,
        jiraChangeItem.getPrimaryKey(),
        jiraChangeItem);

    return jiraChangeItem;
  }
  @Override
  public Faculty updateImpl(
      com.asu.poly.teams.manualSelect.slayer.model.Faculty faculty, boolean merge)
      throws SystemException {
    faculty = toUnwrappedModel(faculty);

    boolean isNew = faculty.isNew();

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.update(session, faculty, merge);

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

    if (isNew) {
      FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
    }

    EntityCacheUtil.putResult(
        FacultyModelImpl.ENTITY_CACHE_ENABLED, FacultyImpl.class, faculty.getPrimaryKey(), faculty);

    return faculty;
  }
  @Override
  public TraCuuThuTucHanhChinh updateImpl(
      org.oep.cmon.dao.touchscreen.model.TraCuuThuTucHanhChinh traCuuThuTucHanhChinh, boolean merge)
      throws SystemException {
    traCuuThuTucHanhChinh = toUnwrappedModel(traCuuThuTucHanhChinh);

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.update(session, traCuuThuTucHanhChinh, merge);

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

    EntityCacheUtil.putResult(
        TraCuuThuTucHanhChinhModelImpl.ENTITY_CACHE_ENABLED,
        TraCuuThuTucHanhChinhImpl.class,
        traCuuThuTucHanhChinh.getPrimaryKey(),
        traCuuThuTucHanhChinh);

    return traCuuThuTucHanhChinh;
  }
  @Override
  protected HRUserTimeOff removeImpl(HRUserTimeOff hrUserTimeOff) throws SystemException {
    hrUserTimeOff = toUnwrappedModel(hrUserTimeOff);

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.delete(session, hrUserTimeOff);
    } catch (Exception e) {
      throw processException(e);
    } finally {
      closeSession(session);
    }

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);

    EntityCacheUtil.removeResult(
        HRUserTimeOffModelImpl.ENTITY_CACHE_ENABLED,
        HRUserTimeOffImpl.class,
        hrUserTimeOff.getPrimaryKey());

    return hrUserTimeOff;
  }
  @Override
  public Bar updateImpl(com.liferay.testtransaction.model.Bar bar, boolean merge)
      throws SystemException {
    bar = toUnwrappedModel(bar);

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.update(session, bar, merge);

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);

    EntityCacheUtil.putResult(
        BarModelImpl.ENTITY_CACHE_ENABLED, BarImpl.class, bar.getPrimaryKey(), bar);

    return bar;
  }
  @Override
  public Asset updateImpl(com.liferay.ams.model.Asset asset, boolean merge) throws SystemException {
    asset = toUnwrappedModel(asset);

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.update(session, asset, merge);

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);

    EntityCacheUtil.putResult(
        AssetModelImpl.ENTITY_CACHE_ENABLED, AssetImpl.class, asset.getPrimaryKey(), asset);

    return asset;
  }
  @Override
  public Quota updateImpl(org.lsug.quota.model.Quota quota, boolean merge) throws SystemException {
    quota = toUnwrappedModel(quota);

    boolean isNew = quota.isNew();

    QuotaModelImpl quotaModelImpl = (QuotaModelImpl) quota;

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.update(session, quota, merge);

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

    if (isNew || !QuotaModelImpl.COLUMN_BITMASK_ENABLED) {
      FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
    }

    EntityCacheUtil.putResult(
        QuotaModelImpl.ENTITY_CACHE_ENABLED, QuotaImpl.class, quota.getPrimaryKey(), quota);

    if (isNew) {
      FinderCacheUtil.putResult(
          FINDER_PATH_FETCH_BY_CLASSNAMEIDCLASSPK,
          new Object[] {Long.valueOf(quota.getClassNameId()), Long.valueOf(quota.getClassPK())},
          quota);
    } else {
      if ((quotaModelImpl.getColumnBitmask()
              & FINDER_PATH_FETCH_BY_CLASSNAMEIDCLASSPK.getColumnBitmask())
          != 0) {
        Object[] args =
            new Object[] {
              Long.valueOf(quotaModelImpl.getOriginalClassNameId()),
              Long.valueOf(quotaModelImpl.getOriginalClassPK())
            };

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_CLASSNAMEIDCLASSPK, args);

        FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_CLASSNAMEIDCLASSPK, args);

        FinderCacheUtil.putResult(
            FINDER_PATH_FETCH_BY_CLASSNAMEIDCLASSPK,
            new Object[] {Long.valueOf(quota.getClassNameId()), Long.valueOf(quota.getClassPK())},
            quota);
      }
    }

    return quota;
  }
  @Override
  public ExpandoRow updateImpl(
      com.liferay.portlet.expando.model.ExpandoRow expandoRow, boolean merge)
      throws SystemException {
    expandoRow = toUnwrappedModel(expandoRow);

    boolean isNew = expandoRow.isNew();

    ExpandoRowModelImpl expandoRowModelImpl = (ExpandoRowModelImpl) expandoRow;

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.update(session, expandoRow, merge);

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);

    EntityCacheUtil.putResult(
        ExpandoRowModelImpl.ENTITY_CACHE_ENABLED,
        ExpandoRowImpl.class,
        expandoRow.getPrimaryKey(),
        expandoRow);

    if (!isNew
        && ((expandoRow.getTableId() != expandoRowModelImpl.getOriginalTableId())
            || (expandoRow.getClassPK() != expandoRowModelImpl.getOriginalClassPK()))) {
      FinderCacheUtil.removeResult(
          FINDER_PATH_FETCH_BY_T_C,
          new Object[] {
            Long.valueOf(expandoRowModelImpl.getOriginalTableId()),
            Long.valueOf(expandoRowModelImpl.getOriginalClassPK())
          });
    }

    if (isNew
        || ((expandoRow.getTableId() != expandoRowModelImpl.getOriginalTableId())
            || (expandoRow.getClassPK() != expandoRowModelImpl.getOriginalClassPK()))) {
      FinderCacheUtil.putResult(
          FINDER_PATH_FETCH_BY_T_C,
          new Object[] {
            Long.valueOf(expandoRow.getTableId()), Long.valueOf(expandoRow.getClassPK())
          },
          expandoRow);
    }

    return expandoRow;
  }
  @Override
  public Advertising updateImpl(com.pinsightmedia.sb.model.Advertising advertising, boolean merge)
      throws SystemException {
    advertising = toUnwrappedModel(advertising);

    boolean isNew = advertising.isNew();

    AdvertisingModelImpl advertisingModelImpl = (AdvertisingModelImpl) advertising;

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.update(session, advertising, merge);

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

    if (isNew || !AdvertisingModelImpl.COLUMN_BITMASK_ENABLED) {
      FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
    } else {
      if ((advertisingModelImpl.getColumnBitmask()
              & FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID.getColumnBitmask())
          != 0) {
        Object[] args = new Object[] {Long.valueOf(advertisingModelImpl.getOriginalUserId())};

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERID, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID, args);

        args = new Object[] {Long.valueOf(advertisingModelImpl.getUserId())};

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERID, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID, args);
      }
    }

    EntityCacheUtil.putResult(
        AdvertisingModelImpl.ENTITY_CACHE_ENABLED,
        AdvertisingImpl.class,
        advertising.getPrimaryKey(),
        advertising);

    return advertising;
  }
  @Override
  public PanicButton updateImpl(com.ese.ils.beta.model.PanicButton panicButton, boolean merge)
      throws SystemException {
    panicButton = toUnwrappedModel(panicButton);

    boolean isNew = panicButton.isNew();

    PanicButtonModelImpl panicButtonModelImpl = (PanicButtonModelImpl) panicButton;

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.update(session, panicButton, merge);

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

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

    if (isNew || !PanicButtonModelImpl.COLUMN_BITMASK_ENABLED) {
      FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
    } else {
      if ((panicButtonModelImpl.getColumnBitmask()
              & FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_BYMODULE.getColumnBitmask())
          != 0) {
        Object[] args = new Object[] {Long.valueOf(panicButtonModelImpl.getOriginalModuleId())};

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_BYMODULE, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_BYMODULE, args);

        args = new Object[] {Long.valueOf(panicButtonModelImpl.getModuleId())};

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_BYMODULE, args);
        FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_BYMODULE, args);
      }
    }

    EntityCacheUtil.putResult(
        PanicButtonModelImpl.ENTITY_CACHE_ENABLED,
        PanicButtonImpl.class,
        panicButton.getPrimaryKey(),
        panicButton);

    return panicButton;
  }
  @Override
  protected Quota removeImpl(Quota quota) throws SystemException {
    quota = toUnwrappedModel(quota);

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.delete(session, quota);
    } catch (Exception e) {
      throw processException(e);
    } finally {
      closeSession(session);
    }

    clearCache(quota);

    return quota;
  }
  @Override
  protected iProject removeImpl(iProject iProject) throws SystemException {
    iProject = toUnwrappedModel(iProject);

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.delete(session, iProject);
    } catch (Exception e) {
      throw processException(e);
    } finally {
      closeSession(session);
    }

    clearCache(iProject);

    return iProject;
  }
  @Override
  protected Faculty removeImpl(Faculty faculty) throws SystemException {
    faculty = toUnwrappedModel(faculty);

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.delete(session, faculty);
    } catch (Exception e) {
      throw processException(e);
    } finally {
      closeSession(session);
    }

    clearCache(faculty);

    return faculty;
  }
  @Override
  protected PanicButton removeImpl(PanicButton panicButton) throws SystemException {
    panicButton = toUnwrappedModel(panicButton);

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.delete(session, panicButton);
    } catch (Exception e) {
      throw processException(e);
    } finally {
      closeSession(session);
    }

    clearCache(panicButton);

    return panicButton;
  }
  @Override
  protected Advertising removeImpl(Advertising advertising) throws SystemException {
    advertising = toUnwrappedModel(advertising);

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.delete(session, advertising);
    } catch (Exception e) {
      throw processException(e);
    } finally {
      closeSession(session);
    }

    clearCache(advertising);

    return advertising;
  }
  @Override
  protected TraCuuThuTucHanhChinh removeImpl(TraCuuThuTucHanhChinh traCuuThuTucHanhChinh)
      throws SystemException {
    traCuuThuTucHanhChinh = toUnwrappedModel(traCuuThuTucHanhChinh);

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.delete(session, traCuuThuTucHanhChinh);
    } catch (Exception e) {
      throw processException(e);
    } finally {
      closeSession(session);
    }

    clearCache(traCuuThuTucHanhChinh);

    return traCuuThuTucHanhChinh;
  }