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

📄 sqlhelper.java

📁 Athena酒店小组_Athena酒店管理系统
💻 JAVA
字号:
/*
 * SQLHelper.java
 *
 * Created on 2007年5月25日, 上午12:07
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package helper;

import java.util.*;

/**
 *
 * @author Virlene Cheng
 */
public class SQLHelper
{
    
    /** Creates a new instance of SQLHelper */
    public SQLHelper()
    {
    }
    
    public static String createCondition(ArrayList<String> names)
    {	
	if (names == null)
	{
	    return "";
	}
	
	if (names.size() == 0)
	{
	    return "";
	}
	
	String condition = " WHERE ";
	for(int i = 0; i < names.size() - 1; i++)
	{
	    condition += names.get(i) + " = ? " + " AND ";
	}
	condition += names.get(names.size() - 1) + " = ?";
	return condition;
    }
    
    
    
    
    
    
    
    
    
    
}

⌨️ 快捷键说明

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