package com.oguerreiro.resilient.service.interceptors;

import java.io.Serializable;

import com.oguerreiro.resilient.domain.AbstractResilientEntity;
import com.oguerreiro.resilient.service.dto.AbstractResilientDTO;

/**
 * Interceptor called AFTER the domainRepository.save is called. Any exception raised, will fail the transaction.
 * CHANGES made to domain, will be lost, since the save already occurred. But changes will be used by the mapper, that
 * will be invoked next.<br>
 * Implement this in a Server impl class
 * 
 * @param <DTO>
 * @param <T>
 * @param <ID>
 */
public interface AfterUpdateServiceInterceptor<DTO extends AbstractResilientDTO<ID>, T extends AbstractResilientEntity<T, ID>, ID extends Serializable> {
  T afterUpdate(T domain);
}
