PublisherActionRepository.java
877 Bytes
package org.legrog.entities;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
/**
* Interface for accessing PublisherAction
*/
public interface PublisherActionRepository extends JpaRepository<PublisherAction, Integer> {
/**
* Returns last action of a type for a publisher
*
* @param actionType ActionType requested
* @param publisher Publisher concerned by the action
* @return PublisherAction
*/
PublisherAction findFirstByActionTypeAndPublisherOrderByPublisherActionDatetimeDesc(ActionType actionType, Publisher publisher);
/**
* Returns all actions for a PublisherVersion
*
* @param publisherVersion PublisherVersion concerned by the actions
* @return List<PublisherAction>
*/
List<PublisherAction> findByPublisherVersion(PublisherVersion publisherVersion);
}