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

pers.clare.hisql.repository.SQLCrudRepository Maven / Gradle / Ivy

The newest version!
package pers.clare.hisql.repository;

import org.springframework.lang.NonNull;
import pers.clare.hisql.page.Next;
import pers.clare.hisql.page.Page;
import pers.clare.hisql.page.Pagination;
import pers.clare.hisql.page.Sort;

import java.util.Collection;
import java.util.List;

public interface SQLCrudRepository extends SQLRepository {

    @NonNull
    long count();

    @NonNull
    long count(Entity entity);

    @NonNull
    List findAll();

    @NonNull
    List findAll(Sort sort);

    @NonNull
    Page page(Pagination pagination);

    @NonNull
    Next next(Pagination pagination);

    @NonNull
    Entity insert(@NonNull Entity entity);

    @NonNull
    int update(Entity entity);

    @NonNull
    int delete(Entity entity);

    @NonNull
    Collection insertAll(@NonNull Collection entities);

    @NonNull
    Entity[] insertAll(@NonNull Entity[] entities);

    @NonNull
    int[] updateAll(@NonNull Collection entities);

    @NonNull
    int[] updateAll(@NonNull Entity[] entities);

    @NonNull
    int deleteAll();

    @NonNull
    int[] deleteAll(@NonNull Collection entities);

    @NonNull
    int[] deleteAll(@NonNull Entity[] entities);

    @NonNull
    long countById(Key key);

    @NonNull
    int deleteById(Key key);

    Entity find(Entity entity);

    Entity findById(Key key);

     T findByObject(T object);

     T insertByObject(T object);

     int updateByObject(T object);

     int deleteByObject(T object);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy