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

com.github.frtu.persistence.r2dbc.query.IPostgresJsonbQueryBuilder.kt Maven / Gradle / Ivy

package com.github.frtu.persistence.r2dbc.query

import org.springframework.data.domain.Pageable
import org.springframework.data.relational.core.query.Criteria
import org.springframework.data.relational.core.query.Query

/**
 * Builder for {@link Query} and {@link Criteria} of spring data.
 * Help to create query for id or Criteria using Map
 *
 * @author Frédéric TU
 * @since 1.1.1
 */
interface IPostgresJsonbQueryBuilder {
    /**
     * Allow to create a Query for ID of the desired Entity
     * @param id ID from the type of the entity
     * @param  Type for id entity (UUID, Long, ..)
     */
    fun  id(id: T): Query

    fun criteria(criteriaMap: Map): Criteria

    fun query(criteria: Criteria, pageable: Pageable? = null): Query
    fun query(criteria: Criteria, offset: Long?, limit: Int?): Query

    fun query(criteriaMap: Map, pageable: Pageable? = null): Query
    fun query(criteriaMap: Map, offset: Long?, limit: Int?): Query
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy