コード例 #1
0
  /**
   * Caches the shopping item field in the entity cache if it is enabled.
   *
   * @param shoppingItemField the shopping item field
   */
  public void cacheResult(ShoppingItemField shoppingItemField) {
    EntityCacheUtil.putResult(
        ShoppingItemFieldModelImpl.ENTITY_CACHE_ENABLED,
        ShoppingItemFieldImpl.class,
        shoppingItemField.getPrimaryKey(),
        shoppingItemField);

    shoppingItemField.resetOriginalValues();
  }
コード例 #2
0
 /**
  * Caches the shopping item fields in the entity cache if it is enabled.
  *
  * @param shoppingItemFields the shopping item fields
  */
 public void cacheResult(List<ShoppingItemField> shoppingItemFields) {
   for (ShoppingItemField shoppingItemField : shoppingItemFields) {
     if (EntityCacheUtil.getResult(
             ShoppingItemFieldModelImpl.ENTITY_CACHE_ENABLED,
             ShoppingItemFieldImpl.class,
             shoppingItemField.getPrimaryKey())
         == null) {
       cacheResult(shoppingItemField);
     } else {
       shoppingItemField.resetOriginalValues();
     }
   }
 }