예제 #1
0
 /**
  * Caches the releases in the entity cache if it is enabled.
  *
  * @param releases the releases
  */
 public void cacheResult(List<Release> releases) {
   for (Release release : releases) {
     if (EntityCacheUtil.getResult(
             ReleaseModelImpl.ENTITY_CACHE_ENABLED, ReleaseImpl.class, release.getPrimaryKey())
         == null) {
       cacheResult(release);
     } else {
       release.resetOriginalValues();
     }
   }
 }
예제 #2
0
  /**
   * Caches the release in the entity cache if it is enabled.
   *
   * @param release the release
   */
  public void cacheResult(Release release) {
    EntityCacheUtil.putResult(
        ReleaseModelImpl.ENTITY_CACHE_ENABLED, ReleaseImpl.class, release.getPrimaryKey(), release);

    FinderCacheUtil.putResult(
        FINDER_PATH_FETCH_BY_SERVLETCONTEXTNAME,
        new Object[] {release.getServletContextName()},
        release);

    release.resetOriginalValues();
  }