📄 guests.java
字号:
package com.qq.content;
import javax.sql.rowset.CachedRowSet;
import java.sql.*;
public class guests {
private int id=1;
private String name=null;
private String email=null;
private String title=null;
private String context=null;
private DBTool db=null;
public guests(){
id=1;
name=new String("Guest");
email=new String("");
title=new String("");
context=new String("");
try{
db=new DBTool();
}catch(Exception e){
}
}
public CachedRowSet query(String sql) throws SQLException {
CachedRowSet rs=null;
rs=db.query(sql);
return rs;
}
public void execute(String sql) throws SQLException{
db.exec(sql);
}
public void setGuest(int id,String name,String email,String title,String context){
this.id=id;
this.name=name;
this.email=email;
this.title=title;
this.context=context;
}
public void setID(int id){
this.id=id;
}
public int getID(){
return this.id;
}
public void setName(String name){
this.name=name;
}
public String getName(){
return this.name;
}
public void setEmail(String email){
this.email=email;
}
public String getEmail(){
return this.email;
}
public void setTitle(String title){
this.title=title;
}
public String getTitle(){
return this.title;
}
public void setContext(String context){
this.context=context;
}
public String getContext(){
return this.context;
}
public static void main(String[] args) {
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -