/* * This class was automatically generated with * Castor 0.9.9M2, using an XML * Schema. * $Id$ */ package org.vamsas.objects.core; //---------------------------------/ //- Imported classes and packages -/ //---------------------------------/ import java.io.IOException; import java.io.Reader; import java.io.Serializable; import java.io.Writer; import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; import org.exolab.castor.xml.ValidationException; import org.xml.sax.ContentHandler; /** * Class AppDataChoice. * * @version $Revision$ $Date$ */ public class AppDataChoice extends org.vamsas.client.object implements java.io.Serializable { //--------------------------/ //- Class/Member Variables -/ //--------------------------/ /** * Field _data */ private java.lang.String _data; /** * Field _dataReference */ private byte[] _dataReference; //----------------/ //- Constructors -/ //----------------/ public AppDataChoice() { super(); } //-- org.vamsas.objects.core.AppDataChoice() //-----------/ //- Methods -/ //-----------/ /** * Note: hashCode() has not been overriden * * @param obj * @return boolean */ public boolean equals(java.lang.Object obj) { if ( this == obj ) return true; if (super.equals(obj)==false) return false; if (obj instanceof AppDataChoice) { AppDataChoice temp = (AppDataChoice)obj; if (this._data != null) { if (temp._data == null) return false; else if (!(this._data.equals(temp._data))) return false; } else if (temp._data != null) return false; if (this._dataReference != null) { if (temp._dataReference == null) return false; else if (!(this._dataReference.equals(temp._dataReference))) return false; } else if (temp._dataReference != null) return false; return true; } return false; } //-- boolean equals(java.lang.Object) /** * Returns the value of field 'data'. * * @return String * @return the value of field 'data'. */ public java.lang.String getData() { return this._data; } //-- java.lang.String getData() /** * Returns the value of field 'dataReference'. * * @return byte * @return the value of field 'dataReference'. */ public byte[] getDataReference() { return this._dataReference; } //-- byte[] getDataReference() /** * Method isValid * * * * @return boolean */ public boolean isValid() { try { validate(); } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; } //-- boolean isValid() /** * Method marshal * * * * @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) /** * Method marshal * * * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, handler); } //-- void marshal(org.xml.sax.ContentHandler) /** * Sets the value of field 'data'. * * @param data the value of field 'data'. */ public void setData(java.lang.String data) { this._data = data; } //-- void setData(java.lang.String) /** * Sets the value of field 'dataReference'. * * @param dataReference the value of field 'dataReference'. */ public void setDataReference(byte[] dataReference) { this._dataReference = dataReference; } //-- void setDataReference(byte) /** * Method unmarshal * * * * @param reader * @return AppDataChoice */ public static org.vamsas.objects.core.AppDataChoice unmarshal(java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (org.vamsas.objects.core.AppDataChoice) Unmarshaller.unmarshal(org.vamsas.objects.core.AppDataChoice.class, reader); } //-- org.vamsas.objects.core.AppDataChoice unmarshal(java.io.Reader) /** * Method validate * */ 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() }