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

package nz.co.cks.tms.xml;

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

import java.io.Reader;
import java.io.Serializable;
import java.io.Writer;
import nz.co.cks.tms.xml.types.NcbTypeType;
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
import org.exolab.castor.xml.ValidationException;

/**
 * Class NcbType.
 * 
 * @version $Revision$ $Date$
 */
public abstract class NcbType implements java.io.Serializable {


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

    /**
     * Field _ncbId
     */
    private int _ncbId;

    /**
     * keeps track of state for field: _ncbId
     */
    private boolean _has_ncbId;

    /**
     * Field _parentNcbId
     */
    private int _parentNcbId;

    /**
     * keeps track of state for field: _parentNcbId
     */
    private boolean _has_parentNcbId;

    /**
     * Field _ncbType
     */
    private nz.co.cks.tms.xml.types.NcbTypeType _ncbType;

    /**
     * Field _namePrefix
     */
    private java.lang.String _namePrefix;

    /**
     * Field _name
     */
    private java.lang.String _name;

    /**
     * Field _nameLast
     */
    private java.lang.String _nameLast;

    /**
     * Field _nameSuffix
     */
    private java.lang.String _nameSuffix;

    /**
     * Field _login
     */
    private java.lang.String _login;

    /**
     * Field _password
     */
    private java.lang.String _password;

    /**
     * Field _certificate
     */
    private byte[] _certificate;


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

    public NcbType() {
        super();
    } //-- nz.co.cks.tms.xml.NcbType()


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

    /**
     * Method deleteNcbId
     */
    public void deleteNcbId()
    {
        this._has_ncbId= false;
    } //-- void deleteNcbId() 

    /**
     * Method deleteParentNcbId
     */
    public void deleteParentNcbId()
    {
        this._has_parentNcbId= false;
    } //-- void deleteParentNcbId() 

    /**
     * Method getCertificateReturns the value of field
     * 'certificate'.
     * 
     * @return the value of field 'certificate'.
     */
    public byte[] getCertificate()
    {
        return this._certificate;
    } //-- byte[] getCertificate() 

    /**
     * Method getLoginReturns the value of field 'login'.
     * 
     * @return the value of field 'login'.
     */
    public java.lang.String getLogin()
    {
        return this._login;
    } //-- java.lang.String getLogin() 

    /**
     * Method getNameReturns the value of field 'name'.
     * 
     * @return the value of field 'name'.
     */
    public java.lang.String getName()
    {
        return this._name;
    } //-- java.lang.String getName() 

    /**
     * Method getNameLastReturns the value of field 'nameLast'.
     * 
     * @return the value of field 'nameLast'.
     */
    public java.lang.String getNameLast()
    {
        return this._nameLast;
    } //-- java.lang.String getNameLast() 

    /**
     * Method getNamePrefixReturns the value of field 'namePrefix'.
     * 
     * @return the value of field 'namePrefix'.
     */
    public java.lang.String getNamePrefix()
    {
        return this._namePrefix;
    } //-- java.lang.String getNamePrefix() 

    /**
     * Method getNameSuffixReturns the value of field 'nameSuffix'.
     * 
     * @return the value of field 'nameSuffix'.
     */
    public java.lang.String getNameSuffix()
    {
        return this._nameSuffix;
    } //-- java.lang.String getNameSuffix() 

    /**
     * Method getNcbIdReturns the value of field 'ncbId'.
     * 
     * @return the value of field 'ncbId'.
     */
    public int getNcbId()
    {
        return this._ncbId;
    } //-- int getNcbId() 

    /**
     * Method getNcbTypeReturns the value of field 'ncbType'.
     * 
     * @return the value of field 'ncbType'.
     */
    public nz.co.cks.tms.xml.types.NcbTypeType getNcbType()
    {
        return this._ncbType;
    } //-- nz.co.cks.tms.xml.types.NcbTypeType getNcbType() 

    /**
     * Method getParentNcbIdReturns the value of field
     * 'parentNcbId'.
     * 
     * @return the value of field 'parentNcbId'.
     */
    public int getParentNcbId()
    {
        return this._parentNcbId;
    } //-- int getParentNcbId() 

    /**
     * Method getPasswordReturns the value of field 'password'.
     * 
     * @return the value of field 'password'.
     */
    public java.lang.String getPassword()
    {
        return this._password;
    } //-- java.lang.String getPassword() 

    /**
     * Method hasNcbId
     */
    public boolean hasNcbId()
    {
        return this._has_ncbId;
    } //-- boolean hasNcbId() 

    /**
     * Method hasParentNcbId
     */
    public boolean hasParentNcbId()
    {
        return this._has_parentNcbId;
    } //-- boolean hasParentNcbId() 

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

    /**
     * Method setCertificateSets the value of field 'certificate'.
     * 
     * @param certificate the value of field 'certificate'.
     */
    public void setCertificate(byte[] certificate)
    {
        this._certificate = certificate;
    } //-- void setCertificate(byte) 

    /**
     * Method setLoginSets the value of field 'login'.
     * 
     * @param login the value of field 'login'.
     */
    public void setLogin(java.lang.String login)
    {
        this._login = login;
    } //-- void setLogin(java.lang.String) 

    /**
     * Method setNameSets the value of field 'name'.
     * 
     * @param name the value of field 'name'.
     */
    public void setName(java.lang.String name)
    {
        this._name = name;
    } //-- void setName(java.lang.String) 

    /**
     * Method setNameLastSets the value of field 'nameLast'.
     * 
     * @param nameLast the value of field 'nameLast'.
     */
    public void setNameLast(java.lang.String nameLast)
    {
        this._nameLast = nameLast;
    } //-- void setNameLast(java.lang.String) 

    /**
     * Method setNamePrefixSets the value of field 'namePrefix'.
     * 
     * @param namePrefix the value of field 'namePrefix'.
     */
    public void setNamePrefix(java.lang.String namePrefix)
    {
        this._namePrefix = namePrefix;
    } //-- void setNamePrefix(java.lang.String) 

    /**
     * Method setNameSuffixSets the value of field 'nameSuffix'.
     * 
     * @param nameSuffix the value of field 'nameSuffix'.
     */
    public void setNameSuffix(java.lang.String nameSuffix)
    {
        this._nameSuffix = nameSuffix;
    } //-- void setNameSuffix(java.lang.String) 

    /**
     * Method setNcbIdSets the value of field 'ncbId'.
     * 
     * @param ncbId the value of field 'ncbId'.
     */
    public void setNcbId(int ncbId)
    {
        this._ncbId = ncbId;
        this._has_ncbId = true;
    } //-- void setNcbId(int) 

    /**
     * Method setNcbTypeSets the value of field 'ncbType'.
     * 
     * @param ncbType the value of field 'ncbType'.
     */
    public void setNcbType(nz.co.cks.tms.xml.types.NcbTypeType ncbType)
    {
        this._ncbType = ncbType;
    } //-- void setNcbType(nz.co.cks.tms.xml.types.NcbTypeType) 

    /**
     * Method setParentNcbIdSets the value of field 'parentNcbId'.
     * 
     * @param parentNcbId the value of field 'parentNcbId'.
     */
    public void setParentNcbId(int parentNcbId)
    {
        this._parentNcbId = parentNcbId;
        this._has_parentNcbId = true;
    } //-- void setParentNcbId(int) 

    /**
     * Method setPasswordSets the value of field 'password'.
     * 
     * @param password the value of field 'password'.
     */
    public void setPassword(java.lang.String password)
    {
        this._password = password;
    } //-- void setPassword(java.lang.String) 

    /**
     * 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() 

}
