/**
   * Caches the threat_subcategories_lkp in the entity cache if it is enabled.
   *
   * @param threat_subcategories_lkp the threat_subcategories_lkp
   */
  public void cacheResult(threat_subcategories_lkp threat_subcategories_lkp) {
    EntityCacheUtil.putResult(
        threat_subcategories_lkpModelImpl.ENTITY_CACHE_ENABLED,
        threat_subcategories_lkpImpl.class,
        threat_subcategories_lkp.getPrimaryKey(),
        threat_subcategories_lkp);

    threat_subcategories_lkp.resetOriginalValues();
  }
  /**
   * Clears the cache for the threat_subcategories_lkp.
   *
   * <p>The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link
   * com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
   */
  @Override
  public void clearCache(threat_subcategories_lkp threat_subcategories_lkp) {
    EntityCacheUtil.removeResult(
        threat_subcategories_lkpModelImpl.ENTITY_CACHE_ENABLED,
        threat_subcategories_lkpImpl.class,
        threat_subcategories_lkp.getPrimaryKey());

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
  }
 /**
  * Caches the threat_subcategories_lkps in the entity cache if it is enabled.
  *
  * @param threat_subcategories_lkps the threat_subcategories_lkps
  */
 public void cacheResult(List<threat_subcategories_lkp> threat_subcategories_lkps) {
   for (threat_subcategories_lkp threat_subcategories_lkp : threat_subcategories_lkps) {
     if (EntityCacheUtil.getResult(
             threat_subcategories_lkpModelImpl.ENTITY_CACHE_ENABLED,
             threat_subcategories_lkpImpl.class,
             threat_subcategories_lkp.getPrimaryKey())
         == null) {
       cacheResult(threat_subcategories_lkp);
     } else {
       threat_subcategories_lkp.resetOriginalValues();
     }
   }
 }
  protected threat_subcategories_lkp toUnwrappedModel(
      threat_subcategories_lkp threat_subcategories_lkp) {
    if (threat_subcategories_lkp instanceof threat_subcategories_lkpImpl) {
      return threat_subcategories_lkp;
    }

    threat_subcategories_lkpImpl threat_subcategories_lkpImpl = new threat_subcategories_lkpImpl();

    threat_subcategories_lkpImpl.setNew(threat_subcategories_lkp.isNew());
    threat_subcategories_lkpImpl.setPrimaryKey(threat_subcategories_lkp.getPrimaryKey());

    threat_subcategories_lkpImpl.setId(threat_subcategories_lkp.getId());
    threat_subcategories_lkpImpl.setThreat_sub_category(
        threat_subcategories_lkp.getThreat_sub_category());
    threat_subcategories_lkpImpl.setParent_id(threat_subcategories_lkp.getParent_id());

    return threat_subcategories_lkpImpl;
  }