⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 transferbean.java

📁 本教程介绍j2ee企业开发方面的知识
💻 JAVA
字号:
/* * * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved. *  * This software is the proprietary information of Sun Microsystems, Inc.   * Use is subject to license terms. *  */ package com.sun.ebank.web;import com.sun.ebank.web.Currency;import com.sun.ebank.web.BeanManager;import com.sun.ebank.util.*;import com.sun.ebank.ejb.tx.TxController;import com.sun.ebank.ejb.exception.*;import java.util.*;import java.rmi.RemoteException;public class TransferBean {   private BeanManager beanManager;   private double transferAmount;   private String fromAccountId, toAccountId;   public TransferBean () {      beanManager = null;      transferAmount = 0.0;      fromAccountId = "";      toAccountId = "";    }   public void populate() {      TxController txCtl = beanManager.getTxController();       try {         txCtl.transferFunds(transferAmount, "Transfer", fromAccountId, toAccountId);      } catch (RemoteException e) {      } catch (IllegalArgumentException e) {      } catch (AccountNotFoundException e) {      } catch (InsufficientFundsException e) {      } catch (InsufficientCreditException e) {      }   }   public double getTransferAmount() {      return transferAmount;   }   public String getFromAccountId() {      return fromAccountId;   }   public String getToAccountId() {      return toAccountId;   }                      public void setBeanManager(BeanManager beanManager) {      this.beanManager = beanManager;   }   public void setTransferAmount(double transferAmount) {      this.transferAmount = transferAmount;        Debug.print("Setting transfer amount to: " + transferAmount);   }   public void setFromAccountId(String fromAccountId) {      this.fromAccountId = fromAccountId;      Debug.print("Setting from account id to: " + fromAccountId);   }     public void setToAccountId(String toAccountId) {      this.toAccountId = toAccountId;      Debug.print("Setting to account id to: " + toAccountId);              }  }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -