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

com.adobe.cq.commerce.common.DefaultCommerceResult Maven / Gradle / Ivy

/*************************************************************************
 *
 * ADOBE CONFIDENTIAL
 * __________________
 *
 *  Copyright 2013 Adobe Systems Incorporated
 *  All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of Adobe Systems Incorporated and its suppliers,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to Adobe Systems Incorporated and its
 * suppliers and are protected by trade secret or copyright law.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Adobe Systems Incorporated.
 **************************************************************************/
package com.adobe.cq.commerce.common;

import com.adobe.cq.commerce.api.CommerceFacet;
import com.adobe.cq.commerce.api.CommerceQuery;
import com.adobe.cq.commerce.api.CommerceResult;
import com.adobe.cq.commerce.api.CommerceSort;
import com.adobe.cq.commerce.api.PaginationInfo;
import com.adobe.cq.commerce.api.Product;

import java.util.List;

/**
 * Default implementation for {@code CommerceResult}.
 *
 * @see CommerceResult
 */
public class DefaultCommerceResult implements CommerceResult {

    private PaginationInfo paginationInfo;
    private List sorts;
    private List facets;
    private List products;
    private CommerceQuery originalQuery;
    private CommerceQuery actualQuery;

    /**
     * {@inheritDoc}
     */
    public PaginationInfo getPaginationInfo() {
        return paginationInfo;
    }

    /**
     * {@inheritDoc}
     */
    public List getSorts() {
        return sorts;
    }

    /**
     * {@inheritDoc}
     */
    public List getProducts() {
        return products;
    }

    /**
     * {@inheritDoc}
     */
    public CommerceQuery getOriginalQuery() {
        return originalQuery;
    }

    /**
     * {@inheritDoc}
     */
    public CommerceQuery getActualQuery() {
        return actualQuery;
    }

    /**
     * {@inheritDoc}
     */
    public List getFacets() {
        return facets;
    }

    public void setPaginationInfo(PaginationInfo paginationInfo) {
        this.paginationInfo = paginationInfo;
    }

    @SuppressWarnings("unchecked")
    public void setSorts(List sorts) {
        this.sorts = (List) sorts;
    }

    @SuppressWarnings("unchecked")
    public void setFacets(List facets) {
        this.facets = (List) facets;
    }

    @SuppressWarnings("unchecked")
    public void setProducts(List products) {
        this.products = (List) products;
    }

    public void setOriginalQuery(CommerceQuery originalQuery) {
        this.originalQuery = originalQuery;
    }

    public void setActualQuery(CommerceQuery actualQuery) {
        this.actualQuery = actualQuery;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy