📄 classoftypes.java~2~
字号:
package com.richard.dao;
import java.util.*;
import java.sql.ResultSet;
import com.richard.dto.*;
public class ClassOfTypes implements InterfaceOfTypes {
DBOperate objDBOperate=new DBOperate();
public ClassOfTypes() {
}
/**
* typesDelete
*
* @param objTypes Types
* @todo Implement this com.richard.dao.InterfaceOfTypes method
*/
public void typesDelete(Types objTypes) {
}
/**
* typesInsert
*
* @param objTypes Types
* @todo Implement this com.richard.dao.InterfaceOfTypes method
*/
public void typesInsert(Types objTypes) {
}
/**
* typesQuery
*
* @param objTypes Types
* @return Types
* @todo Implement this com.richard.dao.InterfaceOfTypes method
*/
public Types typesQuery(Types objTypes) {
return null;
}
/**
* typesQueryAll
*
* @return ArrayList
* @todo Implement this com.richard.dao.InterfaceOfTypes method
*/
public ArrayList typesQueryAll() {
String sqlCommand="select * from types";
ArrayList objArrayList=new ArrayList();
ResultSet rs=objDBOperate.getResultSet("petclinic",sqlCommand);
try {
while(rs.next())
{
Types objTypes=new Types();
objTypes.setId(rs.getInt(1));
objTypes.setName(rs.getString(2));
objArrayList.add(objTypes);
}
} catch (Exception ex) {
System.out.println(ex.getMessage());
}
return objArrayList;
}
/**
* typesUpdate
*
* @param objTypes Types
* @todo Implement this com.richard.dao.InterfaceOfTypes method
*/
public void typesUpdate(Types objTypes) {
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -