001/* 002 * (C) Copyright 2006-2007 Nuxeo SAS (http://nuxeo.com/) and contributors. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the GNU Lesser General Public License 006 * (LGPL) version 2.1 which accompanies this distribution, and is available at 007 * http://www.gnu.org/licenses/lgpl.html 008 * 009 * This library is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012 * Lesser General Public License for more details. 013 * 014 * Contributors: 015 * Nuxeo - initial API and implementation 016 * 017 * $Id: QueryResultImpl.java 20796 2007-06-19 09:52:03Z sfermigier $ 018 */ 019 020package org.nuxeo.ecm.platform.relations.api.impl; 021 022import java.util.List; 023import java.util.Map; 024 025import org.nuxeo.ecm.platform.relations.api.Node; 026import org.nuxeo.ecm.platform.relations.api.QueryResult; 027 028/** 029 * Query results. 030 * 031 * @author <a href="mailto:at@nuxeo.com">Anahide Tchertchian</a> 032 */ 033public class QueryResultImpl implements QueryResult { 034 035 private static final long serialVersionUID = 1L; 036 037 protected Integer count; 038 039 protected List<String> variableNames; 040 041 protected List<Map<String, Node>> results; 042 043 /** 044 * Constructor for query result. 045 * 046 * @param count integer number of results 047 * @param variableNames list of variable names as requested in query 048 * @param results list of variable names/nodes found mapping 049 */ 050 public QueryResultImpl(Integer count, List<String> variableNames, List<Map<String, Node>> results) { 051 this.count = count; 052 this.variableNames = variableNames; 053 this.results = results; 054 } 055 056 public Integer getCount() { 057 return count; 058 } 059 060 public void setCount(Integer count) { 061 this.count = count; 062 } 063 064 public List<Map<String, Node>> getResults() { 065 return results; 066 } 067 068 public void setResults(List<Map<String, Node>> results) { 069 this.results = results; 070 } 071 072 public List<String> getVariableNames() { 073 return variableNames; 074 } 075 076 public void setVariableNames(List<String> variableNames) { 077 this.variableNames = variableNames; 078 } 079 080}