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

com.blazebit.persistence.spring.data.repository.EntityViewRepository Maven / Gradle / Ivy

/*
 * SPDX-License-Identifier: Apache-2.0
 * Copyright Blazebit
 */

package com.blazebit.persistence.spring.data.repository;

import org.springframework.data.repository.NoRepositoryBean;
import org.springframework.data.repository.Repository;

import java.io.Serializable;

/**
 * Base entity view repository interface.
 *
 * @param  Entity view type.
 * @param  Entity ID type.
 *
 * @author Moritz Becker
 * @since 1.2.0
 */
@NoRepositoryBean
public interface EntityViewRepository extends Repository {

    /**
     * Finds the entity view of type {@code } with the given id.
     *
     * @param id the id of the entity view of type {@code } to find
     * @return the entity view of type {@code } with the given id
     */
    T findOne(ID id);

    /**
     * Checks if an entity view of type {@code } with the given id exists.
     *
     * @param id the id to check for existence
     * @return true if an entity view of type {@code } exists, else false
     */
    boolean exists(ID id);

    /**
     * Returns all entity views of type {@code }.
     *
     * @return an iterator over all entity views of type {@code }
     */
    Iterable findAll();

    /**
     * Finds all entity views of type {@code } with the given ids.
     *
     * @param idIterable the ids of the entity views of type {@code } to find
     * @return an iterator over the entity views of type {@code }
     */
    Iterable findAll(Iterable idIterable);

    /**
     * Gets the number of existing entity views.of type {@code }.
     *
     * @return the number of existing entity views of type {@code }
     */
    long count();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy