FileDocCategorySizeDatePackage
Office.javaAPI DocExample3527Thu Mar 07 09:58:26 GMT 2002javajaxb.generated.hr

Office.java

/*
 * This class was automatically generated with 
 * <a href="http://castor.exolab.org">Castor 0.9.3</a>, using an
 * XML Schema.
 * $Id$
 */

package javajaxb.generated.hr;

  //---------------------------------/
 //- Imported classes and packages -/
//---------------------------------/

import java.io.Reader;
import java.io.Serializable;
import java.io.Writer;
import org.exolab.castor.xml.*;
import org.exolab.castor.xml.MarshalException;
import org.exolab.castor.xml.ValidationException;
import org.xml.sax.DocumentHandler;

/**
 * 
 * @version $Revision$ $Date$
**/
public class Office implements java.io.Serializable {


      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/

    private int _id;

    /**
     * keeps track of state for field: _id
    **/
    private boolean _has_id;

    private Address _address;


      //----------------/
     //- Constructors -/
    //----------------/

    public Office() {
        super();
    } //-- javajaxb.generated.hr.Office()


      //-----------/
     //- Methods -/
    //-----------/

    /**
    **/
    public void deleteId()
    {
        this._has_id= false;
    } //-- void deleteId() 

    /**
    **/
    public Address getAddress()
    {
        return this._address;
    } //-- Address getAddress() 

    /**
    **/
    public int getId()
    {
        return this._id;
    } //-- int getId() 

    /**
    **/
    public boolean hasId()
    {
        return this._has_id;
    } //-- boolean hasId() 

    /**
    **/
    public boolean isValid()
    {
        try {
            validate();
        }
        catch (org.exolab.castor.xml.ValidationException vex) {
            return false;
        }
        return true;
    } //-- boolean isValid() 

    /**
     * 
     * @param out
    **/
    public void marshal(java.io.Writer out)
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
        
        Marshaller.marshal(this, out);
    } //-- void marshal(java.io.Writer) 

    /**
     * 
     * @param handler
    **/
    public void marshal(org.xml.sax.DocumentHandler handler)
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
        
        Marshaller.marshal(this, handler);
    } //-- void marshal(org.xml.sax.DocumentHandler) 

    /**
     * 
     * @param address
    **/
    public void setAddress(Address address)
    {
        this._address = address;
    } //-- void setAddress(Address) 

    /**
     * 
     * @param id
    **/
    public void setId(int id)
    {
        this._id = id;
        this._has_id = true;
    } //-- void setId(int) 

    /**
     * 
     * @param reader
    **/
    public static javajaxb.generated.hr.Office unmarshal(java.io.Reader reader)
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
        return (javajaxb.generated.hr.Office) Unmarshaller.unmarshal(javajaxb.generated.hr.Office.class, reader);
    } //-- javajaxb.generated.hr.Office unmarshal(java.io.Reader) 

    /**
    **/
    public void validate()
        throws org.exolab.castor.xml.ValidationException
    {
        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
        validator.validate(this);
    } //-- void validate() 

}