src/service/TypeService.java
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package service;
import dao.TypeDao;
import model.Type;
import java.sql.SQLException;
import java.util.List;
public class TypeService {
TypeDao tDao=new TypeDao();
public List<Type> GetAllType()
{
List<Type> list=null;
try {
list=tDao.GetAllType();
} catch (SQLException e) {
e.printStackTrace();
}
return list;
}
public Type selectTypeNameByID(int typeid)
{
Type type=null;
try {
type=tDao.selectTypeNameByID(typeid);
} catch (SQLException e) {
e.printStackTrace();
}
return type;
}
public Type select(int id) {
Type t=null;
try {
t = tDao.select(id);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return t;
}
public void insert(Type t) {
try {
tDao.insert(t);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public void update(Type t) {
try {
tDao.update(t);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public boolean delete(int id) {
try {
tDao.delete(id);
return true;
后面还有 7 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。