/** * 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(); } } }
/** * 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(); }