📄 portfoliohandlerrmiserverimpl.java
字号:
package ase.assignment.sts.rmi.server;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import ase.assignment.sts.api.PortfolioHandler;
import ase.assignment.sts.beans.PortfolioEntity;
import ase.assignment.sts.db.impl.HandlerFactoryJDBCImpl;
public class PortfolioHandlerRMIServerImpl extends UnicastRemoteObject
implements PortfolioHandler {
protected PortfolioHandlerRMIServerImpl() throws RemoteException {
super();
// TODO Auto-generated constructor stub
}
private static final long serialVersionUID = 3930456185990547554L;
private PortfolioHandler getHandler() throws RemoteException {
return new HandlerFactoryJDBCImpl().getPortfolioHandler();
}
public void create(PortfolioEntity entity) throws RemoteException {
getHandler().create(entity);
}
public void delete(int porId) throws RemoteException {
getHandler().delete(porId);
}
public PortfolioEntity findById(int porId) throws RemoteException {
return getHandler().findById(porId);
}
public PortfolioEntity[] getAllPortfolios(String username)
throws RemoteException {
return getHandler().getAllPortfolios(username);
}
public void update(PortfolioEntity entity) throws RemoteException {
getHandler().update(entity);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -