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

📄 queryinfo.java

📁 软件工程资料
💻 JAVA
字号:
package com.cnpoint.myspaces.common.util;

import java.io.Serializable;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

public class QueryInfo implements Serializable {

	/**
	 * WHERE clause without 'WHERE' keyword
	 */
	private String whereClause = new String();

	/**
	 * ORDER BY clause without 'ORDER BY' keyword
	 */
	private String orderByClause = new String();

	/**
	 * Number of records to include in result set
	 */
	private Integer limit;

	/**
	 * Value to start counting records from
	 */
	private Integer offset;

	/**
	 * Map of queryParameters to put in query
	 */
	private Map queryParameters = Collections.synchronizedMap(new HashMap());

	/**
	 * Creates new instance of QueryInfo
	 */
	public QueryInfo() {
	}

	/**
	 * Creates new instance of QueryInfo
	 *
	 * @param whereClause   WHERE clause without 'WHERE' keyword
	 * @param orderByClause ORDER BY clause without 'ORDER BY' keyword
	 * @param limit         Number of records to include in result set
	 * @param offset        Value to start counting records from
	 */
	public QueryInfo(String whereClause, String orderByClause, Integer limit, Integer offset) {
		this.whereClause = whereClause;
		this.orderByClause = orderByClause;
		this.limit = limit;
		this.offset = offset;
		queryParameters = Collections.synchronizedMap(new HashMap());
	}

    /**
     * Gets the WHERE clause
     *
     * @return the WHERE clause
     */
	public String getWhereClause() {
		return whereClause;
	}

    /**
     * Sets the WHERE clause
     *
     * @param whereClause the WHERE clause to set
     */
	public void setWhereClause(String whereClause) {
		this.whereClause = whereClause;
	}

    /**
     * Gets the ORDER BY clause
     *
     * @return the ORDER BY clause
     */
	public String getOrderByClause() {
		return orderByClause;
	}

    /**
     * Sets the ORDER BY clause
     *
     * @param orderByClause the ORDER BY clause to set
     */
	public void setOrderByClause(String orderByClause) {
		this.orderByClause = orderByClause;
	}

    /**
     * Gets the limit (the maximum number of returned objects)
     *
     * @return the limit
     */
	public Integer getLimit() {
		return limit;
	}

    /**
     * Sets the limit (the maximum number of returned objects)
     *
     * @param limit the limit to set
     */
	public void setLimit(Integer limit) {
		this.limit = limit;
	}

    /**
     * Gets offset (the number of first object to return)
     *
     * @return the offset
     */
	public Integer getOffset() {
		return offset;
	}

    /**
     * Sets offset (the number of first object to return)
     *
     * @param offset the offset to set
     */
	public void setOffset(Integer offset) {
		this.offset = offset;
	}

    /**
     * Sets parameters that will be added to query
     *
     * @return the query parameters
     */
	public Map getQueryParameters() {
		return queryParameters;
	}

    /**
     * Gets parameters that will be added to query
     *
     * @param queryParameters the query parameters to set
     */
	public void setQueryParameters(Map queryParameters) {
		this.queryParameters = queryParameters;
	}

}

⌨️ 快捷键说明

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