/*
 * Copyright (c) 2003 by Hyperwave AG. All rights reserved.
 */

  /**
   * @author wputz
   */

// <JSClass>
  /**
   * Public constructor, creates an instance of the object value object.
   */
  SearchQueryVO = function(aParam) {
    if ( aParam == "__proto__" )
      return;

    this.code_                  = null;
    this.certificateNumber_     = null;
    this.certificateDateMin_    = null;
    this.certificateDateMax_    = null;
    this.validityExpirationMin_ = null;
    this.validityExpirationMax_ = null;
    this.classification_        = null;
    this.manufacturer_          = null;
    this.deviceType_            = null;
    this.certificateType_       = null;
    this.announcementDateMin_   = null;
    this.announcementDateMax_   = null;
    this.announcementNumber_    = null;
  }
  //--------------------------------------------------------------------
  // Inheritance call for JavaScript.
  class$ = doInherit (SearchQueryVO);

  //--------------------------------------------------------------------
  /**
   * Serializes the value object
   *
   * @return String: the serialization of the value object
   */
  class$.serialize = function ()
  {
    var ws = new WebSerializer();

    ws.addValue("cd",    this.code_);
    ws.addValue("cn",    this.certificateNumber_);
    ws.addValue("cdmin", this.certificateDateMin_);
    ws.addValue("cdmax", this.certificateDateMax_);
    ws.addValue("vemin", this.validityExpirationMin_);
    ws.addValue("vemax", this.validityExpirationMax_);
    ws.addValue("cl",    this.classification_);
    ws.addValue("mf",    this.manufacturer_);
    ws.addValue("dt",    this.deviceType_);
    ws.addValue("ct",    this.certificateType_);
    ws.addValue("admin", this.announcementDateMin_);
    ws.addValue("admax", this.announcementDateMax_);
    ws.addValue("an",    this.announcementNumber_);
                          
    return ws.getString();
  }

  //--------------------------------------------------------------------
  /**
   * Serializes the value object to a javascript object
   *
   * @return object: object containing the data of the value object
   */
  class$.serializeToObject = function ()
  {
    var ret = {};

    WebSerializer.static_.setProperty(ret, "cd",    this.code_);
    WebSerializer.static_.setProperty(ret, "cn",    this.certificateNumber_);
    WebSerializer.static_.setProperty(ret, "cdmin", this.certificateDateMin_);
    WebSerializer.static_.setProperty(ret, "cdmax", this.certificateDateMax_);
    WebSerializer.static_.setProperty(ret, "vemin", this.validityExpirationMin_);
    WebSerializer.static_.setProperty(ret, "vemax", this.validityExpirationMax_);
    WebSerializer.static_.setProperty(ret, "cl",    this.classification_);
    WebSerializer.static_.setProperty(ret, "mf",    this.manufacturer_);
    WebSerializer.static_.setProperty(ret, "dt",    this.deviceType_);
    WebSerializer.static_.setProperty(ret, "ct",    this.certificateType_);
    WebSerializer.static_.setProperty(ret, "admin", this.announcementDateMin_);
    WebSerializer.static_.setProperty(ret, "admax", this.announcementDateMax_);
    WebSerializer.static_.setProperty(ret, "an",    this.announcementNumber_);

    return ret;
  }

  //--------------------------------------------------------------------
  /**
   * Creates a new SearchQueryVO from a given java script object. The object has to be generated
   * from method <code>serializeToObject()</code>
   *
   * @param theObject: object: the values for the new SearchQueryVO
   * @return SearchQueryVO: the new value object
   */
  class$.static_.createFromObject = function (theObject)
  {
    var vo = new SearchQueryVO();

    if (typeof theObject.cd != "undefined") vo.code_                  = theObject.cd;
    if (typeof theObject.cn != "undefined") vo.certificateNumber_     = theObject.cn;
    if (typeof theObject.cd != "undefined") vo.certificateDateMin_    = theObject.cdmin;
    if (typeof theObject.cd != "undefined") vo.certificateDateMax_    = theObject.cdmax;
    if (typeof theObject.ve != "undefined") vo.validityExpirationMin_ = theObject.vemin;
    if (typeof theObject.ve != "undefined") vo.validityExpirationMax_ = theObject.vemax;
    if (typeof theObject.cl != "undefined") vo.classification_        = theObject.cl;
    if (typeof theObject.mf != "undefined") vo.manufacturer_          = theObject.mf;
    if (typeof theObject.dt != "undefined") vo.deviceType_            = theObject.dt;
    if (typeof theObject.ct != "undefined") vo.certificateType_       = theObject.ct;
    if (typeof theObject.ad != "undefined") vo.announcementDateMin_   = theObject.admin;
    if (typeof theObject.ad != "undefined") vo.announcementDateMax_   = theObject.admax;
    if (typeof theObject.an != "undefined") vo.announcementNumber_    = theObject.an;

    return vo;
  }

  //--------------------------------------------------------------------
  /**
   * Deserializes the value object
   *
   * @return SearchQueryVO: the deserialized value object
   */
  class$.static_.deserialize = function (theString)
  {
    // build a new instance of the value object
    var vo = new SearchQueryVO();

    var ws = new WebSerializer(theString);

    vo.code_                  = ws.getValue("cd", "string");
    vo.certificateNumber_     = ws.getValue("cn", "string");
    vo.certificateDateMin_    = ws.getValue("cdmin", "string");
    vo.certificateDateMax_    = ws.getValue("cdmax", "string");
    vo.validityExpirationMin_ = ws.getValue("vemin", "string");
    vo.validityExpirationMax_ = ws.getValue("vemax", "string");
    vo.classification_        = ws.getValue("cl", "string");
    vo.manufacturer_          = ws.getValue("mf", "string");
    vo.deviceType_            = ws.getValue("dt", "string");
    vo.certificateType_       = ws.getValue("ct", "string");
    vo.announcementDateMin_   = ws.getValue("admin", "string");
    vo.announcementDateMax_   = ws.getValue("admax", "string");
    vo.announcementNumber_    = ws.getValue("an", "string");

    // return the newly created value object
    return vo;
  }

  //- <code> -------------------------------------------------------------------
  /**
   * Sets the code.
   *
   * @param aCode: String
   */
  class$.setCode = function (aCode)
  {
    this.code_ = aCode;
  }

  /**
   * Gets the code.
   *
   * @return String
   */
  class$.getCode = function ()
  {
    return this.code_;
  }
  //- <code> -------------------------------------------------------------------

  //- <certificateNumber> -------------------------------------------------------------------
  /**
   * Sets the certificateNumber.
   *
   * @param aCertificateNumber: String
   */
  class$.setCertificateNumber = function (aCertificateNumber)
  {
    this.certificateNumber_ = aCertificateNumber;
  }

  /**
   * Gets the certificateNumber.
   *
   * @return String
   */
  class$.getCertificateNumber = function ()
  {
    return this.certificateNumber_;
  }
  //- </certificateNumber> -------------------------------------------------------------------

  //- <certificateDateMin> -------------------------------------------------------------------
  /**
   * Sets the certificateDateMin.
   *
   * @param acertificateDateMin: String
   */
  class$.setCertificateDateMin = function (acertificateDateMin)
  {
    this.certificateDateMin_ = acertificateDateMin;
  }

  /**
   * Gets the certificateDateMin.
   *
   * @return String
   */
  class$.getCertificateDateMin = function ()
  {
    return this.certificateDateMin_;
  }
  //- </certificateDateMin> -------------------------------------------------------------------

  //- <certificateDateMax> -------------------------------------------------------------------
  /**
   * Sets the certificateDateMax.
   *
   * @param acertificateDateMax: String
   */
  class$.setCertificateDateMax = function (acertificateDateMax)
  {
    this.certificateDateMax_ = acertificateDateMax;
  }

  /**
   * Gets the certificateDateMax.
   *
   * @return String
   */
  class$.getCertificateDateMax = function ()
  {
    return this.certificateDateMax_;
  }
  //- </certificateDateMax> -------------------------------------------------------------------

  //- <validityExpirationMin> -------------------------------------------------------------------
  /**
   * Sets the validityExpirationMin.
   *
   * @param avalidityExpirationMin: String
   */
  class$.setValidityExpirationMin = function (avalidityExpirationMin)
  {
    this.validityExpirationMin_ = avalidityExpirationMin;
  }

  /**
   * Gets the validityExpirationMin.
   *
   * @return String
   */
  class$.getValidityExpirationMin = function ()
  {
    return this.validityExpirationMin_;
  }
  //- </validityexpirationmin> -------------------------------------------------------------------

  //- <validityExpirationMax> -------------------------------------------------------------------
  /**
   * Sets the validityExpirationMax.
   *
   * @param avalidityExpirationMax: String
   */
  class$.setValidityExpirationMax = function (avalidityExpirationMax)
  {
    this.validityExpirationMax_ = avalidityExpirationMax;
  }

  /**
   * Gets the validityExpirationMax.
   *
   * @return String
   */
  class$.getValidityExpirationMax = function ()
  {
    return this.validityExpirationMax_;
  }
  //- </validityexpirationmax> -------------------------------------------------------------------

  //- <classification> -------------------------------------------------------------------
  /**
   * Sets the classification.
   *
   * @param aClassification: String
   */
  class$.setClassification = function (aClassification)
  {
    this.classification_ = aClassification;
  }

  /**
   * Gets the classification.
   *
   * @return String
   */
  class$.getClassification = function ()
  {
    return this.classification_;
  }
  //- </classification> -------------------------------------------------------------------

  //- <manufacturer> -------------------------------------------------------------------
  /**
   * Sets the manufacturer.
   *
   * @param aManufacturer: String
   */
  class$.setManufacturer = function (aManufacturer)
  {
    this.manufacturer_ = aManufacturer;
  }

  /**
   * Gets the manufacturer.
   *
   * @return String
   */
  class$.getManufacturer = function ()
  {
    return this.manufacturer_;
  }
  //- </manufacturer> -------------------------------------------------------------------

  //- <deviceType> -------------------------------------------------------------------
  /**
   * Sets the deviceType.
   *
   * @param aDeviceType: String
   */
  class$.setDeviceType = function (aDeviceType)
  {
    this.deviceType_ = aDeviceType;
  }

  /**
   * Gets the deviceType.
   *
   * @return String
   */
  class$.getDeviceType = function ()
  {
    return this.deviceType_;
  }
  //- </deviceType> -------------------------------------------------------------------

  //- <certificateType> -------------------------------------------------------------------
  /**
   * Sets the certificateType.
   *
   * @param aCertificateType: String
   */
  class$.setCertificateType = function (aCertificateType)
  {
    this.certificateType_ = aCertificateType;
  }

  /**
   * Gets the certificateType.
   *
   * @return String
   */
  class$.getCertificateType = function ()
  {
    return this.certificateType_;
  }
  //- </certificateType> -------------------------------------------------------------------

  //- <announcementDateMin> -------------------------------------------------------------------
  /**
   * Sets the announcementDateMin.
   *
   * @param anannouncementDateMin: String
   */
  class$.setAnnouncementDateMin = function (anannouncementDateMin)
  {
    this.announcementDateMin_ = anannouncementDateMin;
  }

  /**
   * Gets the announcementDateMin.
   *
   * @return String
   */
  class$.getAnnouncementDateMin = function ()
  {
    return this.announcementDateMin_;
  }
  //- </announcementDateMin> -------------------------------------------------------------------

  //- <announcementDateMax> -------------------------------------------------------------------
  /**
   * Sets the announcementDateMax.
   *
   * @param anannouncementDateMax: String
   */
  class$.setAnnouncementDateMax = function (anannouncementDateMax)
  {
    this.announcementDateMax_ = anannouncementDateMax;
  }

  /**
   * Gets the announcementDateMax.
   *
   * @return String
   */
  class$.getAnnouncementDateMax = function ()
  {
    return this.announcementDateMax_;
  }
  //- </announcementDateMax> -------------------------------------------------------------------

  //- <announcementNumber> -------------------------------------------------------------------
  /**
   * Sets the announcementNumber.
   *
   * @param anannouncementNumber: String
   */
  class$.setAnnouncementNumber = function (anAnnouncementNumber)
  {
    this.announcementNumber_ = anAnnouncementNumber;
  }

  /**
   * Gets the announcementNumber.
   *
   * @return String
   */
  class$.getAnnouncementNumber = function ()
  {
    return this.announcementNumber_;
  }
  //- </announcementNumber> -------------------------------------------------------------------


// </JSClass>

