📄 videoactorbean.java
字号:
package com.singnet.video.ejb;
import java.util.ArrayList;
import javax.ejb.CreateException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import com.singnet.util.Pager;
import com.singnet.video.VideoActorInfo;
import com.singnet.video.dao.VideoActorDao;
public class VideoActorBean implements SessionBean {
SessionContext sessionContext;
VideoActorDao videoActorDao = new VideoActorDao();
boolean re = false;
public void ejbCreate() throws CreateException {
}
public void ejbRemove() {
}
public void ejbActivate() {
}
public void ejbPassivate() {
}
public void setSessionContext(SessionContext sessionContext) {
this.sessionContext = sessionContext;
}
public boolean addVideoActor(VideoActorInfo videoactorinfo) {
try {
re = videoActorDao.addVideoActor(videoactorinfo);
} catch (Exception e) {
e.printStackTrace();
}
return re;
}
public boolean editVideoActor(VideoActorInfo videoactorinfo) {
try {
re = videoActorDao.editVideoActor(videoactorinfo);
} catch (Exception e) {
e.printStackTrace();
}
return re;
}
public boolean deleteVideoActor(String id) {
try {
re = videoActorDao.deleteVideoActor(id);
} catch (Exception e) {
e.printStackTrace();
}
return re;
}
public ArrayList queryVideoActor(Pager pager) {
ArrayList list = new ArrayList();
try {
list = videoActorDao.queryVideoActorInfo(pager);
} catch (Exception e) {
e.printStackTrace();
}
return list;
}
public int getTotal(Pager pager) {
int re = 0;
try {
re = videoActorDao.getTotal(pager);
} catch (Exception e) {
e.printStackTrace();
}
return re;
}
public VideoActorInfo getVideoActorById(String id) {
VideoActorInfo re = null;
try {
re = videoActorDao.getVideoActorById(id);
} catch (Exception e) {
e.printStackTrace();
}
return re;
}
public VideoActorInfo getVideoActorByName(String name) {
VideoActorInfo re = null;
try {
re = videoActorDao.getVideoActorByName(name);
} catch (Exception e) {
e.printStackTrace();
}
return re;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -