/**
   * Creates a new threat_subcategories_lkp with the primary key. Does not add the
   * threat_subcategories_lkp to the database.
   *
   * @param id the primary key for the new threat_subcategories_lkp
   * @return the new threat_subcategories_lkp
   */
  public threat_subcategories_lkp create(long id) {
    threat_subcategories_lkp threat_subcategories_lkp = new threat_subcategories_lkpImpl();

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

    return threat_subcategories_lkp;
  }
  /**
   * 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();
  }
  @Override
  public void clearCache(List<threat_subcategories_lkp> threat_subcategories_lkps) {
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);

    for (threat_subcategories_lkp threat_subcategories_lkp : threat_subcategories_lkps) {
      EntityCacheUtil.removeResult(
          threat_subcategories_lkpModelImpl.ENTITY_CACHE_ENABLED,
          threat_subcategories_lkpImpl.class,
          threat_subcategories_lkp.getPrimaryKey());
    }
  }
 /**
  * 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;
  }