/**
  * Caches the portal preferenceses in the entity cache if it is enabled.
  *
  * @param portalPreferenceses the portal preferenceses
  */
 public void cacheResult(List<PortalPreferences> portalPreferenceses) {
   for (PortalPreferences portalPreferences : portalPreferenceses) {
     if (EntityCacheUtil.getResult(
             PortalPreferencesModelImpl.ENTITY_CACHE_ENABLED,
             PortalPreferencesImpl.class,
             portalPreferences.getPrimaryKey())
         == null) {
       cacheResult(portalPreferences);
     } else {
       portalPreferences.resetOriginalValues();
     }
   }
 }
  /**
   * Caches the portal preferences in the entity cache if it is enabled.
   *
   * @param portalPreferences the portal preferences
   */
  public void cacheResult(PortalPreferences portalPreferences) {
    EntityCacheUtil.putResult(
        PortalPreferencesModelImpl.ENTITY_CACHE_ENABLED,
        PortalPreferencesImpl.class,
        portalPreferences.getPrimaryKey(),
        portalPreferences);

    FinderCacheUtil.putResult(
        FINDER_PATH_FETCH_BY_O_O,
        new Object[] {
          Long.valueOf(portalPreferences.getOwnerId()),
          Integer.valueOf(portalPreferences.getOwnerType())
        },
        portalPreferences);

    portalPreferences.resetOriginalValues();
  }