1 package epayment.request; 2 3 import epayment.framework.IPaymentRequest; 4 5 15 16 public class PaymentRequest implements IPaymentRequest { 17 18 private String _userId; 19 private String _userPassword; 20 private String _name; 21 private String _accountNumber; 22 private double _amount; 23 private String _comment; 24 25 29 public PaymentRequest() { 30 _userId = ""; 31 _userPassword = ""; 32 _name = ""; 33 _accountNumber = ""; 34 _amount = 0.0; 35 _comment = ""; 36 } 37 38 43 public void setUserId(String id) { 44 _userId = id; 45 } 46 47 52 protected String getUserId() { 53 return _userId; 54 } 55 56 61 public void setUserPassword(String password) { 62 _userPassword = password; 63 } 64 65 70 protected String getUserPassword() { 71 return _userPassword; 72 } 73 74 79 public void setAccountName(String name) { 80 _name = name; 81 } 82 83 88 protected String getAccountName() { 89 return _name; 90 } 91 92 97 public void setAccountNumber(String number) { 98 _accountNumber = number; 99 } 100 101 106 protected String getAccountNumber() { 107 return _accountNumber; 108 } 109 110 115 public void setAmount(double amount) { 116 _amount = amount; 117 } 118 119 124 protected double getAmount() { 125 return _amount; 126 } 127 128 133 public void setComment(String comment) { 134 _comment = comment; 135 } 136 137 142 protected String getComment() { 143 return _comment; 144 } 145 146 151 public String toString() { 152 153 StringBuffer contents = new StringBuffer (); 154 155 contents.append("User ID = " + _userId + "\n"); 156 contents.append("User Password = " + _userPassword + "\n"); 157 contents.append("Name = " + _name + "\n"); 158 contents.append("Account Number = " + _accountNumber + "\n"); 159 contents.append("Amount = " + _amount + "\n"); 160 161 return contents.toString(); 162 } 163 } 164 165 166 167 168 169 170 | Popular Tags |