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

foundation.jpa.querydsl.spring.impl.SearchResultImpl Maven / Gradle / Ivy

There is a newer version: 0.29
Show newest version
package foundation.jpa.querydsl.spring.impl;

import com.querydsl.core.types.EntityPath;
import foundation.jpa.querydsl.spring.Search;
import foundation.jpa.querydsl.spring.SearchCriteria;
import foundation.jpa.querydsl.spring.SearchResult;
import org.springframework.data.domain.Page;

import static java.util.Objects.nonNull;

public class SearchResultImpl> implements SearchResult, Search {

    private final SearchCriteria> criteria;
    private final Page page;
    private final Throwable error;

    public SearchResultImpl(SearchCriteria> criteria, Page page, Throwable error) {
        this.criteria = criteria;
        this.page = page;
        this.error = error;
    }

    @Override
    public SearchCriteria> getCriteria() {
        return criteria;
    }

    @Override
    public Page getPage() {
        return page;
    }

    @Override
    public Throwable getError() {
        return error;
    }

    @Override
    public boolean hasError() {
        return nonNull(error);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy