Methods Summary |
---|
public void | credit(double amt)
credit(Identifier.currentIdentifier(), amt);
|
public void | credit(com.imaginary.lwp.Identifier id, double amt)
Account acct;
try {
acct = (Account)getEntity();
acct.credit(id, amt);
}
catch( RemoteException e ) {
reconnect();
acct = (Account)getEntity();
acct.credit(id, amt);
}
|
public double | getBalance()
return getBalance(Identifier.currentIdentifier());
|
public double | getBalance(com.imaginary.lwp.Identifier id)
if( contains(Account.BALANCE) ) {
Double d = (Double)get(Account.BALANCE);
if( d == null ) {
return 0.0;
}
else {
return d.doubleValue();
}
}
else {
Account acct;
double bal;
try {
acct = (Account)getEntity();
bal = acct.getBalance(id);
}
catch( RemoteException e ) {
reconnect();
acct = (Account)getEntity();
bal = acct.getBalance(id);
}
put(Account.BALANCE, new Double(bal));
return bal;
}
|
public CustomerFacade | getCustomer()
return getCustomer(Identifier.currentIdentifier());
|
public CustomerFacade | getCustomer(com.imaginary.lwp.Identifier id)
if( contains(Account.CUSTOMER) ) {
return (CustomerFacade)get(Account.CUSTOMER);
}
else {
CustomerFacade cust;
Account acct;
try {
acct = (Account)getEntity();
cust = acct.getCustomer(id);
}
catch( RemoteException e ) {
reconnect();
acct = (Account)getEntity();
cust = acct.getCustomer(id);
}
put(Account.CUSTOMER, cust);
return cust;
}
|
public int | getNumber()
return getNumber(Identifier.currentIdentifier());
|
public int | getNumber(com.imaginary.lwp.Identifier id)
if( contains(Account.NUMBER) ) {
Integer num = (Integer)get(Account.NUMBER);
if( num == null ) {
return 0;
}
else {
return num.intValue();
}
}
else {
Account acct;
int num;
try {
acct = (Account)getEntity();
num = acct.getNumber(id);
}
catch( RemoteException e ) {
reconnect();
acct = (Account)getEntity();
num = acct.getNumber(id);
}
put(Account.NUMBER, new Integer(num));
return num;
}
|
public AccountType | getType()
return getType(Identifier.currentIdentifier());
|
public AccountType | getType(com.imaginary.lwp.Identifier id)
if( contains(Account.TYPE) ) {
return (AccountType)get(Account.TYPE);
}
else {
Account acct;
AccountType t;
try {
acct = (Account)getEntity();
t = acct.getType(id);
}
catch( RemoteException e ) {
reconnect();
acct = (Account)getEntity();
t = acct.getType(id);
}
put(Account.TYPE, t);
return t;
}
|