⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 queryresults.java

📁 JoSQL 1.5的源代码。JoSQL(SQL for Java Objects)为Java开发者提供运用SQL语句来操作Java对象集的能力.利用JoSQL可以像操作数据库中的数据一样对任何Java
💻 JAVA
字号:
/* * Copyright 2004-2005 Gary Bentley  *  * Licensed under the Apache License, Version 2.0 (the "License"); you may  * not use this file except in compliance with the License.  * You may obtain a copy of the License at  *    http://www.apache.org/licenses/LICENSE-2.0  * * Unless required by applicable law or agreed to in writing, software  * distributed under the License is distributed on an "AS IS" BASIS,  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  * See the License for the specific language governing permissions and  * limitations under the License. */package org.josql;import java.util.List;import java.util.ArrayList;import java.util.Map;import java.util.HashMap;import java.util.LinkedHashMap;/** * This class holds all the "result" information about the execution of a particular * Query.  It should be noted that this class holds no reference to the Query object * so that a query can be executed, the results "processed" in some way and then the * results can be cleaned up by the GC.  * <p> *  Last Modified By: $Author: barrygently $<br /> *  Last Modified On: $Date: 2005/04/28 05:48:59 $<br /> *  Current Revision: $Revision: 1.2 $<br /> * <p> * @see org.josql.Query#execute(List) */public class QueryResults{    // Execution data.    Map saveValues = new HashMap ();    Map timings = null;    List results = null;    List whereResults = null;    List havingResults = null;    Map groupByResults = null;    Map groupBySaveValues = null;    public QueryResults ()    {    }    public Map getGroupBySaveValues (List k)    {	if (this.groupBySaveValues == null)	{	    return null;	}	return (Map) this.groupBySaveValues.get (k);    }    /**     * Get the save values.     *     * @return The save values.     */    public Map getSaveValues ()    {	return this.saveValues;    }    /**     * Get a particular save value for the passed in key.     *     * @param id The key of the save value.     * @return The value it maps to.     */    public Object getSaveValue (Object id)    {	if (this.saveValues == null)	{	    return null;	}	if (id instanceof String)	{	    id = ((String) id).toLowerCase ();	}	return this.saveValues.get (id);    }    /**     * Get the results of executing the query, this is the "final" results, i.e.     * of executing ALL of the query.     *     * @return The results.     */    public List getResults ()    {	return this.results;    }    /**     * Get the timing information, is a Map of string to double values.     *     * @return The timings.     */    public Map getTimings ()    {	return this.timings;    }    /**     * Get the group by results.     *     * @return The group by results.     */    public Map getGroupByResults ()    {	return this.groupByResults;    }        /**     * Get the having results.     *     * @return The having results.     */    public List getHavingResults ()    {	return this.havingResults;    }    /**     * Get the where results.     *     * @return The where results.     */    public List getWhereResults ()    {	return this.whereResults;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -