📄 searchviewpointbean.java
字号:
/*
* Created on 2008-3-20
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package com.ibm.j2ee.zhanjiang.bean;
import java.io.Serializable;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import com.ibm.j2ee.zhanjiang.bean.DBConnection;
/**
* @author J2EE
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class SearchViewPointBean implements Serializable {
public ResultSet rs;
public DBConnection conn;
public int countRecord=0;
public static int countPageRecord=10;
public int countPage=0;
private int style;
/**
*
*/
public SearchViewPointBean() {
super();
// TODO Auto-generated constructor stub
}
public void SearchName()
{
conn = new DBConnection();
conn.DBConnect();
String query = new String("SELECT * FROM zjTravel");
try {
Statement stm=conn.getConnection().createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
rs = stm.executeQuery(query);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
rs.last();
countRecord = rs.getRow();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
countPage = (countRecord+countPageRecord-1)/countPageRecord;
}
public void CloseConn()
{
conn.ConnectionClosed();
}
/**
* @return
*/
public ResultSet getRs() {
return rs;
}
/**
* @return
*/
public int getCountPage() {
return countPage;
}
/**
* @return
*/
public int getCountPageRecord() {
return countPageRecord;
}
/**
* @return
*/
public int getCountRecord() {
return countRecord;
}
/**
* @return
*/
public int getStyle() {
return style;
}
/**
* @param i
*/
public void setStyle(int i) {
style = i;
}
/**
* @return
*/
/**
* @param string
*/
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -