moviechapters.java
来自「一个用struts tiles的在线影院web系统」· Java 代码 · 共 75 行
JAVA
75 行
package com.eline.vod.client;
import java.sql.SQLException;
import com.blue.web.common.model.Page;
import com.blue.web.common.util.AppKeys;
import com.blue.web.common.util.AppSettings;
import com.eline.vod.dao.DAOFactory;
import com.eline.vod.dao.MovieChapterDAO;
import com.eline.vod.exceptions.ResourceDAOSysException;
import com.eline.vod.exceptions.ResourceException;
import com.eline.vod.model.MovieChapter;
import com.eline.vod.model.MovieChapterCondition;
public class MovieChapters {
private MovieChapterDAO dao = null;
public Page searchMovieChapter(MovieChapterCondition condition, int start, int count) throws SQLException,ResourceException {
try {
return getDAOInstance().searchMovieChapter(condition, start, count);
} catch (ResourceDAOSysException e) {
throw new ResourceException(e.getMessage());
}
}
public MovieChapter getMovieChapter(int movieChapterId) throws SQLException,ResourceException {
try {
return getDAOInstance().getMovieChapter(movieChapterId);
} catch (ResourceDAOSysException e) {
throw new ResourceException(e.getMessage());
}
}
public void createMovieChapter(MovieChapter item) throws SQLException,ResourceException {
try {
getDAOInstance().createMovieChapter(item);
} catch (ResourceDAOSysException e) {
throw new ResourceException(e.getMessage());
}
}
public void updateMovieChapter(MovieChapter item) throws SQLException,ResourceException {
try {
getDAOInstance().updateMovieChapter(item);
} catch (ResourceDAOSysException e) {
throw new ResourceException(e.getMessage());
}
}
public void deleteItem(int movieChapterId) throws SQLException,ResourceException {
try {
getDAOInstance().deleteMovieChapter(movieChapterId);
} catch (ResourceDAOSysException e) {
throw new ResourceException(e.getMessage());
}
}
public void setSortOrder(int sortOrder, int IndexId) throws SQLException,ResourceException {
try {
getDAOInstance().setSortOrder(sortOrder,IndexId);
} catch (ResourceDAOSysException e) {
throw new ResourceDAOSysException(e.getMessage());
}
}
public MovieChapterDAO getDAOInstance() throws SQLException {
if (this.dao == null) {
try {
this.dao = DAOFactory.getMovieChapterDAO(AppSettings.getInstance().getProperty(AppKeys.DS_TYPE));
} catch (SQLException e) {
throw e;
}
}
return this.dao;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?