FileDocCategorySizeDatePackage
CustomerFacade.javaAPI DocExample5034Thu Aug 24 18:55:00 BST 2000com.imaginary.bank

CustomerFacade

public class CustomerFacade extends com.imaginary.lwp.BaseFacade

Fields Summary
Constructors Summary
public CustomerFacade()
Default constructor.

        super();
    
public CustomerFacade(long oid)
Constructs an instance of CustomerFacade having the specified objectID.

param
oid the object ID of the referenced bean

        super(oid);
    
public CustomerFacade(Customer ent)
Constructs an instance of CustomerFacade referencing the specified remote interface.

param
ent the remote interface of the referenced entity

        super(ent);
    
Methods Summary
public voidaddAccount(AccountFacade acct)

        addAccount(Identifier.currentIdentifier(), acct);
    
public voidaddAccount(com.imaginary.lwp.Identifier id, AccountFacade acct)

        Customer cust;

        reset();
        try {
            cust = (Customer)getEntity();
            cust.addAccount(id, acct);
        }
        catch( RemoteException e ) {
            reconnect();
            cust = (Customer)getEntity();
            cust.addAccount(id, acct);
        }
    
public java.util.CollectiongetAccounts()

        return getAccounts(Identifier.currentIdentifier());
    
public java.util.CollectiongetAccounts(com.imaginary.lwp.Identifier id)

        Collection val;

        if( contains(Customer.ACCOUNTS) ) {
            val = (Collection)get(Customer.ACCOUNTS);
            return val;
        }
        try {
            Customer ref;

            ref = (Customer)getEntity();
            val = ref.getAccounts(id);
        }
        catch( RemoteException e ) {
            Customer ref;
            reconnect();
            ref = (Customer)getEntity();
            val = ref.getAccounts(id);
        }
        put(Customer.ACCOUNTS, val);
        return val;
    
public java.lang.StringgetFirstName()

        return getFirstName(Identifier.currentIdentifier());
    
public java.lang.StringgetFirstName(com.imaginary.lwp.Identifier id)
Delegates to getFirstName in the associated entity.

param
a see remote interface
return
an instance of String
throws
RemoteException

        String val;

        if( contains(Customer.FIRST_NAME) ) {
            val = (String)get(Customer.FIRST_NAME);
            return val;
        }
        try {
            Customer ref;

            ref = (Customer)getEntity();
            val = ref.getFirstName(id);
        }
        catch( RemoteException e ) {
            Customer ref;
            reconnect();
            ref = (Customer)getEntity();
            val = ref.getFirstName(id);
        }
        put(Customer.FIRST_NAME, val);
        return val;
    
public java.lang.StringgetLastName()

        return getLastName(Identifier.currentIdentifier());
    
public java.lang.StringgetLastName(com.imaginary.lwp.Identifier id)
Delegates to getLastName in the associated entity.

param
a see remote interface
return
an instance of String
throws
RemoteException

        String val;

        if( contains(Customer.LAST_NAME) ) {
            val = (String)get(Customer.LAST_NAME);
            return val;
        }
        try {
            Customer ref;

            ref = (Customer)getEntity();
            val = ref.getLastName(id);
        }
        catch( RemoteException e ) {
            Customer ref;
            reconnect();
            ref = (Customer)getEntity();
            val = ref.getLastName(id);
        }
        put(Customer.LAST_NAME, val);
        return val;
    
public java.lang.StringgetSocialSecurity()

        return getSocialSecurity(Identifier.currentIdentifier());
    
public java.lang.StringgetSocialSecurity(com.imaginary.lwp.Identifier id)
Delegates to getSocialSecurity in the associated entity.

param
a see remote interface
return
an instance of String
throws
RemoteException

        String val;

        if( contains(Customer.SOCIAL_SECURITY) ) {
            val = (String)get(Customer.SOCIAL_SECURITY);
            return val;
        }
        try {
            Customer ref;

            ref = (Customer)getEntity();
            val = ref.getSocialSecurity(id);
        }
        catch( RemoteException e ) {
            Customer ref;
            reconnect();
            ref = (Customer)getEntity();
            val = ref.getSocialSecurity(id);
        }
        put(Customer.SOCIAL_SECURITY, val);
        return val;