?? adminsession.java~24~
字號(hào):
package sqlaccounts;import javax.naming.*;import javax.rmi.PortableRemoteObject;import java.util.Collection;import java.util.Vector;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2002</p> * <p>Company: </p> * @author unascribed * @version 1.0 */public class AdminSession { private Login loginer; private String type; private double bal; private String Id; public Collection conType; public AdminSession() { try{ Context ctx = new InitialContext(); LoginHome home = (LoginHome)javax.rmi.PortableRemoteObject.narrow(ctx.lookup("Login"),LoginHome.class); loginer = home.create(); }catch(Exception e){ System.out.println(e); } } private void log(String s) { System.out.println(s); } public boolean login(String Id){ try{ return loginer.login(Id); }catch(Exception e){ return false; } } public boolean AddAmount(String id, String Type, double bal) { /**@todo Complete this method*/ try { return loginer.AddId(id, Type, bal); } catch(Exception e) { return false; } } public boolean findByType(String Type) { try { conType=loginer.findByType(Type); return true; } catch(Exception e) { return false; } } public Collection findByType1(String Type) { try { conType=loginer.findByType(Type); return conType; } catch(Exception e) { return null; } } public boolean findOrCreateAccount(String id, String accountType,double balance) { try { return loginer.findOrCreateAccount(id, accountType,balance); } catch (Exception onfe) { return false; } } public void setId(String id) { this.Id =id; } public String getId() { return Id; } public void setBal(double bal) { this.bal=bal; } public double getBal() { return bal; } public void setType(String type) { this.type=type; } public String getType() { return type; }}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -