/*
 * 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 org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
import org.exolab.castor.xml.ValidationException;

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


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

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

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

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

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

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

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


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

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


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

    /**
     * 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 getNcbIdReturns the value of field 'ncbId'.
     * 
     * @return the value of field 'ncbId'.
     */
    public int getNcbId()
    {
        return this._ncbId;
    } //-- int getNcbId() 

    /**
     * Method getNcbNameReturns the value of field 'ncbName'.
     * 
     * @return the value of field 'ncbName'.
     */
    public java.lang.String getNcbName()
    {
        return this._ncbName;
    } //-- java.lang.String getNcbName() 

    /**
     * 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 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 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 setNcbNameSets the value of field 'ncbName'.
     * 
     * @param ncbName the value of field 'ncbName'.
     */
    public void setNcbName(java.lang.String ncbName)
    {
        this._ncbName = ncbName;
    } //-- void setNcbName(java.lang.String) 

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

}
