soccerleagueservice.java
来自「在线足球社区」· Java 代码 · 共 32 行
JAVA
32 行
package com.pandahome.struts.service;
import java.sql.SQLException;
import com.pandahome.struts.domain.League;
import com.pandahome.struts.soccerLeagueDao.Dao;
public class SoccerLeagueService {
private Dao dao;
public SoccerLeagueService() {
dao = new Dao();
}
/*
* 调用SoccerLeagueDAO中的selectLeague方法,返回League对象
*/
public League getLeague(String season, String year) throws SQLException {
return dao.selectLeague(season, year);
}
/*
* 调用SoccerLeagueDAO中的insert方法,插入一条记录
*/
public League createLeague(String season, String year, String title)
throws SQLException {
League league = dao.selectLeague(season, year);
league = dao.insert(league);
return league;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?