All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.eurodyn.qlack.fuse.aaa.repository.SessionRepository Maven / Gradle / Ivy

The newest version!
package com.eurodyn.qlack.fuse.aaa.repository;

import com.eurodyn.qlack.fuse.aaa.model.Session;
import java.util.List;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.stereotype.Repository;

/**
 * A repository interface for Session.It is used to define a number of abstract
 * crud methods
 *
 * @author European Dynamics
 */
@Repository
public interface SessionRepository extends AAARepository {

  /**
   * A deletion method
   *
   * @param date the date
   */
  @Modifying
  void deleteByCreatedOnBefore(long date);

  /**
   * Retrieves the {@link Session} object by its user id
   *
   * @param userId the user id
   * @param pageable the pageable
   * @return the {@link Session} object
   */
  Page findByUserId(String userId, Pageable pageable);

  /**
   * Retrieves a List of {@link Session} objects
   *
   * @param date the date
   * @return a {@link Session} object
   */
  List findByCreatedOnBeforeAndTerminatedOnNull(long date);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy