/**
  * Caches the counters in the entity cache if it is enabled.
  *
  * @param counters the counters
  */
 public void cacheResult(List<Counter> counters) {
   for (Counter counter : counters) {
     if (EntityCacheUtil.getResult(
             CounterModelImpl.ENTITY_CACHE_ENABLED, CounterImpl.class, counter.getPrimaryKey())
         == null) {
       cacheResult(counter);
     } else {
       counter.resetOriginalValues();
     }
   }
 }
  /**
   * Caches the counter in the entity cache if it is enabled.
   *
   * @param counter the counter
   */
  public void cacheResult(Counter counter) {
    EntityCacheUtil.putResult(
        CounterModelImpl.ENTITY_CACHE_ENABLED, CounterImpl.class, counter.getPrimaryKey(), counter);

    counter.resetOriginalValues();
  }