001/* 002 * (C) Copyright 2006-2007 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Nuxeo - initial API and implementation 018 * 019 * $Id: QueryResultImpl.java 20796 2007-06-19 09:52:03Z sfermigier $ 020 */ 021 022package org.nuxeo.ecm.platform.relations.api.impl; 023 024import java.util.List; 025import java.util.Map; 026 027import org.nuxeo.ecm.platform.relations.api.Node; 028import org.nuxeo.ecm.platform.relations.api.QueryResult; 029 030/** 031 * Query results. 032 * 033 * @author <a href="mailto:[email protected]">Anahide Tchertchian</a> 034 */ 035public class QueryResultImpl implements QueryResult { 036 037 private static final long serialVersionUID = 1L; 038 039 protected Integer count; 040 041 protected List<String> variableNames; 042 043 protected List<Map<String, Node>> results; 044 045 /** 046 * Constructor for query result. 047 * 048 * @param count integer number of results 049 * @param variableNames list of variable names as requested in query 050 * @param results list of variable names/nodes found mapping 051 */ 052 public QueryResultImpl(Integer count, List<String> variableNames, List<Map<String, Node>> results) { 053 this.count = count; 054 this.variableNames = variableNames; 055 this.results = results; 056 } 057 058 public Integer getCount() { 059 return count; 060 } 061 062 public void setCount(Integer count) { 063 this.count = count; 064 } 065 066 public List<Map<String, Node>> getResults() { 067 return results; 068 } 069 070 public void setResults(List<Map<String, Node>> results) { 071 this.results = results; 072 } 073 074 public List<String> getVariableNames() { 075 return variableNames; 076 } 077 078 public void setVariableNames(List<String> variableNames) { 079 this.variableNames = variableNames; 080 } 081 082}