FileDocCategorySizeDatePackage
Employee.javaAPI DocExample7557Thu Mar 07 09:58:26 GMT 2002javajaxb.generated.hr

Employee

public class Employee extends Object implements Serializable
Employee representation
version
$Revision$ $Date$

Fields Summary
private int
_id
private boolean
_has_id
keeps track of state for field: _id
private String
_name
private Vector
_addressList
private Organization
_organization
private Office
_office
Constructors Summary
public Employee()

        super();
        _addressList = new Vector();
    
Methods Summary
public voidaddAddress(Address vAddress)

param
vAddress

        if (!(_addressList.size() < 2)) {
            throw new IndexOutOfBoundsException();
        }
        _addressList.addElement(vAddress);
    
public voidaddAddress(int index, Address vAddress)

param
index
param
vAddress

        if (!(_addressList.size() < 2)) {
            throw new IndexOutOfBoundsException();
        }
        _addressList.insertElementAt(vAddress, index);
    
public voiddeleteId()

        this._has_id= false;
    
public java.util.EnumerationenumerateAddress()

        return _addressList.elements();
    
public AddressgetAddress(int index)

param
index

        //-- check bounds for index
        if ((index < 0) || (index > _addressList.size())) {
            throw new IndexOutOfBoundsException();
        }
        
        return (Address) _addressList.elementAt(index);
    
public Address[]getAddress()

        int size = _addressList.size();
        Address[] mArray = new Address[size];
        for (int index = 0; index < size; index++) {
            mArray[index] = (Address) _addressList.elementAt(index);
        }
        return mArray;
    
public intgetAddressCount()

        return _addressList.size();
    
public intgetId()

        return this._id;
    
public java.lang.StringgetName()

        return this._name;
    
public OfficegetOffice()

        return this._office;
    
public OrganizationgetOrganization()

        return this._organization;
    
public booleanhasId()

        return this._has_id;
    
public booleanisValid()

        try {
            validate();
        }
        catch (org.exolab.castor.xml.ValidationException vex) {
            return false;
        }
        return true;
    
public voidmarshal(java.io.Writer out)

param
out

        
        Marshaller.marshal(this, out);
    
public voidmarshal(org.xml.sax.DocumentHandler handler)

param
handler

        
        Marshaller.marshal(this, handler);
    
public AddressremoveAddress(int index)

param
index

        Object obj = _addressList.elementAt(index);
        _addressList.removeElementAt(index);
        return (Address) obj;
    
public voidremoveAllAddress()

        _addressList.removeAllElements();
    
public voidsetAddress(int index, Address vAddress)

param
index
param
vAddress

        //-- check bounds for index
        if ((index < 0) || (index > _addressList.size())) {
            throw new IndexOutOfBoundsException();
        }
        if (!(index < 2)) {
            throw new IndexOutOfBoundsException();
        }
        _addressList.setElementAt(vAddress, index);
    
public voidsetAddress(Address[] addressArray)

param
addressArray

        //-- copy array
        _addressList.removeAllElements();
        for (int i = 0; i < addressArray.length; i++) {
            _addressList.addElement(addressArray[i]);
        }
    
public voidsetId(int id)

param
id

        this._id = id;
        this._has_id = true;
    
public voidsetName(java.lang.String name)

param
name

        this._name = name;
    
public voidsetOffice(Office office)

param
office

        this._office = office;
    
public voidsetOrganization(Organization organization)

param
organization

        this._organization = organization;
    
public static javajaxb.generated.hr.Employeeunmarshal(java.io.Reader reader)

param
reader

        return (javajaxb.generated.hr.Employee) Unmarshaller.unmarshal(javajaxb.generated.hr.Employee.class, reader);
    
public voidvalidate()

        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
        validator.validate(this);