📄 serversqlexecutorutils.java
字号:
package com.cownew.PIS.framework.server.helper;
import java.sql.ResultSet;
import java.sql.SQLException;
import com.cownew.PIS.framework.common.services.ISQLExecutor;
public class ServerSQLExecutorUtils
{
public static ResultSet executeQuery(String sql, Object[] params)
throws SQLException
{
ISQLExecutor sqle = (ISQLExecutor) LocalServiceLocator.getInstance()
.getService(ISQLExecutor.class);
return sqle.execute(sql, params);
}
public static ResultSet executeQuery(String sql) throws SQLException
{
ISQLExecutor sqle = (ISQLExecutor) LocalServiceLocator.getInstance()
.getService(ISQLExecutor.class);
return sqle.execute(sql);
}
public static void execute(String sql, Object[] params) throws SQLException
{
ISQLExecutor sqle = (ISQLExecutor) LocalServiceLocator.getInstance()
.getService(ISQLExecutor.class);
sqle.execute(sql, params);
}
public static void execute(String sql) throws SQLException
{
ISQLExecutor sqle = (ISQLExecutor) LocalServiceLocator.getInstance()
.getService(ISQLExecutor.class);
sqle.execute(sql);
}
public static void batchExecute(String[] sql) throws SQLException
{
ISQLExecutor sqle = (ISQLExecutor) LocalServiceLocator.getInstance()
.getService(ISQLExecutor.class);
sqle.batchExecute(sql);
}
public static void batchExecute(String[] sqlArray, Object[][] paramsArray)
throws SQLException
{
ISQLExecutor sqle = (ISQLExecutor) LocalServiceLocator.getInstance()
.getService(ISQLExecutor.class);
sqle.batchExecute(sqlArray, paramsArray);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -