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

    FinderCacheUtil.putResult(
        FINDER_PATH_FETCH_BY_CLASSNAMEIDCLASSPK,
        new Object[] {Long.valueOf(quota.getClassNameId()), Long.valueOf(quota.getClassPK())},
        quota);

    quota.resetOriginalValues();
  }