/**
  * Caches the announcements flags in the entity cache if it is enabled.
  *
  * @param announcementsFlags the announcements flags
  */
 public void cacheResult(List<AnnouncementsFlag> announcementsFlags) {
   for (AnnouncementsFlag announcementsFlag : announcementsFlags) {
     if (EntityCacheUtil.getResult(
             AnnouncementsFlagModelImpl.ENTITY_CACHE_ENABLED,
             AnnouncementsFlagImpl.class,
             announcementsFlag.getPrimaryKey())
         == null) {
       cacheResult(announcementsFlag);
     } else {
       announcementsFlag.resetOriginalValues();
     }
   }
 }
  /**
   * Caches the announcements flag in the entity cache if it is enabled.
   *
   * @param announcementsFlag the announcements flag
   */
  public void cacheResult(AnnouncementsFlag announcementsFlag) {
    EntityCacheUtil.putResult(
        AnnouncementsFlagModelImpl.ENTITY_CACHE_ENABLED,
        AnnouncementsFlagImpl.class,
        announcementsFlag.getPrimaryKey(),
        announcementsFlag);

    FinderCacheUtil.putResult(
        FINDER_PATH_FETCH_BY_U_E_V,
        new Object[] {
          Long.valueOf(announcementsFlag.getUserId()),
          Long.valueOf(announcementsFlag.getEntryId()),
          Integer.valueOf(announcementsFlag.getValue())
        },
        announcementsFlag);

    announcementsFlag.resetOriginalValues();
  }