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

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

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

import com.querydsl.core.Tuple;
import com.querydsl.core.types.EntityPath;
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 AggregationResultImpl implements SearchResult {

    private final Page page;
    private final Throwable error;

    public AggregationResultImpl(Page page, Throwable error) {
        this.page = page;
        this.error = error;
    }

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

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

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

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

    @Override
    public String toString() {
        return page.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy