Listing 1: AlturaException.java

public abstract class AlturaException extends Exception {
    /** A key in a resource bundle file. */
    private String     key;
    /** Parameters for the error message. */
    private Object[]   args = new Object[0];
    private Throwable  cause = this;

    public AlturaException(String key) {
        this.key = key;
    }
    public AlturaException(String key, Object[] args) {
        this(key);
        this.args = args;
    }
    public AlturaException(String key, Object[] args, Throwable cause){
        this(key, cause);
        this.args = args;
    }
    public String getKey() {
        return key;
    }
    public Object[] getValues() {
        return args;
    }
    public Throwable getCause() {
        return (cause==this ? null : cause);
    }
}

Listing 2: AlturaException.java

import java.beans.SimpleBeanInfo;
import java.beans.PropertyDescriptor;
import java.beans.IntrospectionException;

/**
 * Exposes only those {@link AlturaException}šs properties that can be
 * portably serialized according to the SOAP serialization rules.
 */
public class AlturaExceptionBeanInfo extends SimpleBeanInfo {
    public PropertyDescriptor[] getPropertyDescriptors() {
        PropertyDescriptor pd[] = null;
        try {
            pd = new PropertyDescriptor[] { /* key is read-only */
                new PropertyDescriptor("key", AlturaException.class,
				"getKey", null),
				new PropertyDescriptor("values", AlturaException.class,
				"getStringValues", "setStringValues"),
			};
        } catch (IntrospectionException e) {
        }
        return pd;
    }
}

Listing 3: TransferObjectList.java

package example;

import java.util.ArrayList;
import java.util.Collection;

public class TransferObjectList extends ArrayList {
    private final CustomerTranferObject   EMPTY_ARRAY[] =
	new CustomerTranferObject[0];
    public TransferObjectList() {
    }
    public TransferObjectList(Collection base) {
        super(base);
    }
    public CustomerTranferObject[] getTypedElements() {
        CustomerTranferObject[]  array =
		(CustomerTranferObject[]) toArray(EMPTY_ARRAY);
        return  array;
    }
    public void setTypedElements(CustomerTranferObject[] elems) {
	clear();
        addAll(java.util.Arrays.asList(elems));
    }
}

Listing 4: TransferObjectListBeanInfo.java

package example;

import java.beans.SimpleBeanInfo;
import java.beans.PropertyDescriptor;
import java.beans.IntrospectionException;

public class TransferObjectListBeanInfo extends SimpleBeanInfo {
    public PropertyDescriptor[] getPropertyDescriptors() {
        PropertyDescriptor pd[] = null;
        try {
            pd = new PropertyDescriptor[] {
			new PropertyDescriptor("typedElements",
			TransferObjectList.class),};
        } catch (IntrospectionException e) {
        }
        return pd;
    }
}

Listing 5

public abstract class PersonTransferObject
implements java.io.Serializable {
    private static final long serialVersionUID = 1082469451137L;
    private String lastName;
    private String uniqueId;

    public PersonTransferObject(PersonKey key) {
        setKey(key);
    }
    public PersonKey getKey() {
        PersonKey key = new PersonKey();
        key.setUniqueId(uniqueId);
        return key;
    }
    public void setKey(PersonKey key) {
        this.uniqueId = key.getUniqueId();
    }
    public String getLastName() {
        return lastName;
    }
    public void setLastName(String value) {
        this.lastName = value;
    }

    protected transient Retriever blobRetriever =
            new RetrieverAdaptor();
    public Retriever getBlobRetriever() {
        return blobRetriever;
    }
    public void setBlobRetriever(Retriever blobRetriever) {
        this.blobRetriever = blobRetriever;
    }
}

public class CustomerTranferObject extends PersonTransferObject {
    private static final long serialVersionUID = 10824694501452L;
    private String title;

    public CustomerTranferObject(PersonKey key) {
        super(key);
    }
    public String getTitle() {
        return title;
    }
    public void setTitle(String value) {
        this.title = value;
    }
}

Listing 6: CustomerTransferObjectBeanInfo.java

public class CustomerTranferObjectBeanInfo extends SimpleBeanInfo {
    public PropertyDescriptor[]  getPropertyDescriptors() {
        PropertyDescriptor pd[] = null;
        try {
            pd = new PropertyDescriptor[] {
                new PropertyDescriptor("title",
                        CustomerTranferObject.class),
                new PropertyDescriptor("name",
                        CustomerTranferObject.class,
                        "getLastName", "setLastName"),
                new PropertyDescriptor("uniqueId",
                        CustomerTranferObject.class),};
        } catch (IntrospectionException e) {
        }
        return pd;
    }
}

Listing 7: PersonTransferObjectBeanInfo.java

public class PersonTranferObjectBeanInfo extends SimpleBeanInfo {
    public PropertyDescriptor[]  getPropertyDescriptors() {
        PropertyDescriptor pd[] = null;
        try {
            pd = new PropertyDescriptor[] {
                new PropertyDescriptor("name",
                        PersonTranferObject.class,
                        "getLastName", "setLastName"),
                new PropertyDescriptor("uniqueId",
                        PersonTranferObject.class),};
        } catch (IntrospectionException e) {
        }
        return pd;
    }
}