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

io.rocketbase.commons.repository.AppInviteJpaRepository Maven / Gradle / Ivy

There is a newer version: 4.4.1
Show newest version
package io.rocketbase.commons.repository;

import io.rocketbase.commons.model.AppInviteJpaEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.data.repository.query.QueryByExampleExecutor;

import java.util.Optional;

public interface AppInviteJpaRepository extends PagingAndSortingRepository, QueryByExampleExecutor, JpaSpecificationExecutor {

    @Query("select a from AppInviteJpaEntity a left join fetch a.keyValueMap where a.id = :id")
    Optional findById(@Param("id") String id);

    @Query(value = "select a from AppInviteJpaEntity a left join fetch a.keyValueMap",
            countQuery = "select count(a) from AppInviteJpaEntity a")
    Page findAll(Pageable pageable);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy