@ Override public void cacheResult ( List < CommerceDiscountUsageEntry > commerceDiscountUsageEntries ) { for ( CommerceDiscountUsageEntry commerceDiscountUsageEntry : commerceDiscountUsageEntries ) { if ( entityCache . getResult ( CommerceDiscountUsageEntryModelImpl . ENTITY_CACHE_ENABLED , CommerceDiscountUsageEntryImpl . class , commerceDiscountUsageEntry . getPrimaryKey ( ) ) == null ) { cacheResult ( commerceDiscountUsageEntry ) ; } else { commerceDiscountUsageEntry . resetOriginalValues ( ) ; } } }
Caches the commerce discount usage entries in the entity cache if it is enabled .