コード例 #1
0
 /**
  * Caches the images in the entity cache if it is enabled.
  *
  * @param images the images
  */
 public void cacheResult(List<Image> images) {
   for (Image image : images) {
     if (EntityCacheUtil.getResult(
             ImageModelImpl.ENTITY_CACHE_ENABLED, ImageImpl.class, image.getPrimaryKey())
         == null) {
       cacheResult(image);
     } else {
       image.resetOriginalValues();
     }
   }
 }
コード例 #2
0
  /**
   * Caches the image in the entity cache if it is enabled.
   *
   * @param image the image
   */
  public void cacheResult(Image image) {
    EntityCacheUtil.putResult(
        ImageModelImpl.ENTITY_CACHE_ENABLED, ImageImpl.class, image.getPrimaryKey(), image);

    image.resetOriginalValues();
  }