/**
   * Caches the d l sync in the entity cache if it is enabled.
   *
   * @param dlSync the d l sync
   */
  public void cacheResult(DLSync dlSync) {
    EntityCacheUtil.putResult(
        DLSyncModelImpl.ENTITY_CACHE_ENABLED, DLSyncImpl.class, dlSync.getPrimaryKey(), dlSync);

    FinderCacheUtil.putResult(
        FINDER_PATH_FETCH_BY_FILEID, new Object[] {dlSync.getFileId()}, dlSync);

    dlSync.resetOriginalValues();
  }
 /**
  * Caches the d l syncs in the entity cache if it is enabled.
  *
  * @param dlSyncs the d l syncs
  */
 public void cacheResult(List<DLSync> dlSyncs) {
   for (DLSync dlSync : dlSyncs) {
     if (EntityCacheUtil.getResult(
             DLSyncModelImpl.ENTITY_CACHE_ENABLED, DLSyncImpl.class, dlSync.getPrimaryKey())
         == null) {
       cacheResult(dlSync);
     } else {
       dlSync.resetOriginalValues();
     }
   }
 }