两个查找的方法

public faurerMember findequipmentFacturer(String equipmentFacturer) {

String sql = "select * from equipmentFacturer where equipmentFacturer=?";

ResultSet rs = execQuery(sql, new Object[] { equipmentFacturer });

try {

if (rs.next()) {

faurerMember fmb = new faurerMember();

fmb.setEquipmentFacturer(rs.getString("equipmentFacturer"));

fmb.setEquipmentFacturerName(rs       .getString("equipmentFacturerName"));

fmb.setEquipmentFacturerAddress(rs       .getString("equipmentFacturerAddress"));

fmb.setEquipmentFacturerPostcode(rs       .getString("equipmentFacturerPostcode"));

fmb.setEquipmentFacturerPhone(rs       .getString("equipmentFacturerPhone"));

fmb.setEquipmentFacturerPerson(rs       .getString("equipmentFacturerPerson"));

fmb.setAgentName(rs.getString("agentName"));

fmb.setAgentAddress(rs.getString("agentAddress"));

fmb.setAgentPostcode(rs.getString("agentPostcode"));

fmb.setAgentPhone(rs.getString("agentPhone"));

fmb.setAgentPerson(rs.getString("agentPerson"));

fmb.setAfterServiceName(rs.getString("afterServiceName"));

fmb.setAfterServiceAddress(rs.getString("afterServiceAddress"));

fmb.setAfterServicePostcode(rs       .getString("afterServicePostcode"));

fmb.setAfterServicePhone(rs.getString("afterServicePhone"));

fmb.setProduct(rs.getString("product"));

fmb.setRemark1(rs.getString("remark1"));

return fmb;

}

}

catch (SQLException e) {

// TODO Auto-generated catch block    e.printStackTrace();

}finally {

super.clossAll();

}   return null;

}

public List<faurerMember> findequipmentFacturerName(String name) {

String sql = "select * from equipmentFacturer where equipmentFacturerName like ?";

Object[] params = {"%"+name+"%"};

ResultSet rs = super.execQuery(sql, params);

List<faurerMember> flist = new ArrayList<faurerMember>();

try {    while(rs.next()) {

faurerMember fmb = new faurerMember();

fmb.setEquipmentFacturer(rs.getString("equipmentFacturer"));

fmb.setEquipmentFacturerName(rs       .getString("equipmentFacturerName"));

fmb.setEquipmentFacturerAddress(rs       .getString("equipmentFacturerAddress"));

fmb.setEquipmentFacturerPostcode(rs       .getString("equipmentFacturerPostcode"));

fmb.setEquipmentFacturerPhone(rs       .getString("equipmentFacturerPhone"));

fmb.setEquipmentFacturerPerson(rs       .getString("equipmentFacturerPerson"));

fmb.setAgentName(rs.getString("agentName"));

fmb.setAgentAddress(rs.getString("agentAddress"));

fmb.setAgentPostcode(rs.getString("agentPostcode"));

fmb.setAgentPhone(rs.getString("agentPhone"));

fmb.setAgentPerson(rs.getString("agentPerson"));

fmb.setAfterServiceName(rs.getString("afterServiceName"));

fmb.setAfterServiceAddress(rs.getString("afterServiceAddress"));

fmb.setAfterServicePostcode(rs       .getString("afterServicePostcode"));

fmb.setAfterServicePhone(rs.getString("afterServicePhone"));

fmb.setProduct(rs.getString("product"));

fmb.setRemark1(rs.getString("remark1"));

flist.add(fmb);

}

} catch (SQLException e) {

// TODO Auto-generated catch block    e.printStackTrace();

} finally {    super.clossAll();

}   return flist;

}

时间: 2024-10-11 00:16:31

两个查找的方法的相关文章

使用webdriverwait封装查找元素方法

对于selenium原生的查找元素方法进行封装,在timeout规定时间内循环查找页面上有没有某个元素 这样封装的好处: 1.可以有效提高查找元素的小吕,避免元素还没加载完就抛异常 2.相对于time.sleep和implictly_wait更节省时间 3.大大的减少重复代码,使得用例书写更简洁 代码: #coding:utf-8 #封装元素方法from selenium import webdriverfrom selenium.webdriver.support.ui import WebD

Jmeter 的两种脚本录制方法

Jmeter 的两种脚本录制方法有一.通过badboy工具录制:二.通过Jmeter代理录制 一.通过badboy工具录制 1).工具下载地址:www.badboy.com.au/ 2).下载安装完成后,打开工具(工具默认开启录制),在地址栏输入被测项目的地址,点击右侧箭头即可录制 3).录制完成后,点击结束按钮,选择File--Export Jmeter ,最后的文件格式为.jmx类型 4).打开Jmeter工具,选择文件--打开,选择上一步保存的文件,文件即可成功导入进Jmeter 5).练

Android两种旋转Bitmap方法比较

方法1. 利用Bitmap.createBitmap Bitmap adjustPhotoRotation(Bitmap bm, final int orientationDegree) { Matrix m = new Matrix(); m.setRotate(orientationDegree, ( float ) bm.getWidth() / 2, ( float ) bm.getHeight() / 2); try { Bitmap bm1 = Bitmap.createBitmap

Android中 与数据库有关的两个废除的方法

占没有查到替换的方法,先记着! The method startManagingCursor(Cursor) from the type Activity is deprecated The constructor SimpleCursorAdapter(Context, int, Cursor, String[], int[]) is deprecated Android中 与数据库有关的两个废除的方法,布布扣,bubuko.com

OnClickListener两种监听方法

1 //1种:接口OnClickListener ,在onclick响应 2 public class MainActivity extends Activity implements OnClickListener { //这个类前提要接口OnClickListener 3 4 private Button receive; //按钮的初始化 5 private Button falsewifiButton; 6 7 public void init(){ 8 receive=(Button)

Java中取小数点后两位(四种方法)

摘自http://irobot.iteye.com/blog/285537 Java中取小数点后两位(四种方法) 一 Long是长整型,怎么有小数,是double吧     java.text.DecimalFormat   df=new   java.text.DecimalFormat("#.##");     double   d=3.14159;     System.out.println(df.format(d)); 二 java.math.BigDecimal     B

网站访问慢,服务器负载高-系列查找问题方法

如果以后出现报警各网站无法ping通,或者服务器负载过高,可通过以下几条途径查找原因: 1,查看访问日志,查看是否有访问异常,如有,过滤IP,进行IP封装 cat access.log | awk '{print $1}' | sort | uniq –c | sort –n >/tmp/ip.txt netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort –n 2,查看网卡是否有严重丢包现象,ifconfig查

Android——Fragment介绍及两种基本使用方法

今天在调ViewPager的时候,感觉ViewPager+Fragment这种做法更灵活,所以,现在拿出来Fragment再整理下. 一,为什么要用Fragment 1,灵活布局 Fragment表现Activity中用UI的一个行为或者一部分.可以组合多个fragment放在一个单独的activity中来创建一个多界面区域的UI,并可以在多个activity里重用某一个fragment.把fragment想象成一个activity的模块化区域,有它自己的生命周期,接收属于它的输入事件,并且可以

PHP计算两个时间差的方法

<?php //PHP计算两个时间差的方法 $startdate="2010-12-11 11:40:00"; $enddate="2012-12-12 11:45:09"; $date=floor((strtotime($enddate)-strtotime($startdate))/86400); $hour=floor((strtotime($enddate)-strtotime($startdate))/86400/3600); $minute=flo