ShipmentValue.java :  » ERP-CRM-Financial » OpenXava-3.0 » org » openxava » test » model » Java Open Source

Java Open Source » ERP CRM Financial » OpenXava 3.0 
OpenXava 3.0 » org » openxava » test » model » ShipmentValue.java
/*
 * Generated by XDoclet - Do not edit!
 */
package org.openxava.test.model;

/**
 * Value object for Shipment.
 *
 */
public class ShipmentValue
   extends java.lang.Object
   implements java.io.Serializable 
{

   private static final long serialVersionUID = 1L;

   private java.sql.Timestamp time;
   private boolean timeHasBeenSet = false;
   private java.lang.String description;
   private boolean descriptionHasBeenSet = false;
   private int number;
   private boolean numberHasBeenSet = false;
   private int type;
   private boolean typeHasBeenSet = false;
   private int mode;
   private boolean modeHasBeenSet = false;
   private int customerContactPerson_customer_number;
   private boolean customerContactPerson_customer_numberHasBeenSet = false;

   public ShipmentValue()
   {
   }

   //TODO Cloneable is better than this !
   public ShipmentValue( ShipmentValue otherValue )
   {
    this.time = otherValue.time;
    timeHasBeenSet = true;
    this.description = otherValue.description;
    descriptionHasBeenSet = true;
    this.number = otherValue.number;
    numberHasBeenSet = true;
    this.type = otherValue.type;
    typeHasBeenSet = true;
    this.mode = otherValue.mode;
    modeHasBeenSet = true;
    this.customerContactPerson_customer_number = otherValue.customerContactPerson_customer_number;
    customerContactPerson_customer_numberHasBeenSet = true;
   }

   public java.sql.Timestamp getTime()
   {
    return this.time;
   }

   public void setTime( java.sql.Timestamp time )
   {
    this.time = time;
    timeHasBeenSet = true;
   }

   public boolean timeHasBeenSet(){
    return timeHasBeenSet;
   }
   public java.lang.String getDescription()
   {
    return this.description;
   }

   public void setDescription( java.lang.String description )
   {
    this.description = description;
    descriptionHasBeenSet = true;
   }

   public boolean descriptionHasBeenSet(){
    return descriptionHasBeenSet;
   }
   public int getNumber()
   {
    return this.number;
   }

   public void setNumber( int number )
   {
    this.number = number;
    numberHasBeenSet = true;
   }

   public boolean numberHasBeenSet(){
    return numberHasBeenSet;
   }
   public int getType()
   {
    return this.type;
   }

   public void setType( int type )
   {
    this.type = type;
    typeHasBeenSet = true;
   }

   public boolean typeHasBeenSet(){
    return typeHasBeenSet;
   }
   public int getMode()
   {
    return this.mode;
   }

   public void setMode( int mode )
   {
    this.mode = mode;
    modeHasBeenSet = true;
   }

   public boolean modeHasBeenSet(){
    return modeHasBeenSet;
   }
   public int getCustomerContactPerson_customer_number()
   {
    return this.customerContactPerson_customer_number;
   }

   public void setCustomerContactPerson_customer_number( int customerContactPerson_customer_number )
   {
    this.customerContactPerson_customer_number = customerContactPerson_customer_number;
    customerContactPerson_customer_numberHasBeenSet = true;
   }

   public boolean customerContactPerson_customer_numberHasBeenSet(){
    return customerContactPerson_customer_numberHasBeenSet;
   }

   public String toString()
   {
    StringBuffer str = new StringBuffer("{");

    str.append("time=" + getTime() + " " + "description=" + getDescription() + " " + "number=" + getNumber() + " " + "type=" + getType() + " " + "mode=" + getMode() + " " + "customerContactPerson_customer_number=" + getCustomerContactPerson_customer_number());
    str.append('}');

    return(str.toString());
   }

   /**
    * A Value Object has an identity if the attributes making its Primary Key have all been set. An object without identity is never equal to any other object.
    *
    * @return true if this instance has an identity.
    */
   protected boolean hasIdentity()
   {
    boolean ret = true;
    ret = ret && numberHasBeenSet;
    ret = ret && modeHasBeenSet;
    return ret;
   }

   public boolean equals(Object other)
   {
      if (this == other)
         return true;
    if ( ! hasIdentity() ) return false;
    if (other instanceof ShipmentValue)
    {
     ShipmentValue that = (ShipmentValue) other;
     if ( ! that.hasIdentity() ) return false;
     boolean lEquals = true;
     lEquals = lEquals && this.number == that.number;
     lEquals = lEquals && this.mode == that.mode;

     lEquals = lEquals && isIdentical(that);

     return lEquals;
    }
    else
    {
     return false;
    }
   }

   public boolean isIdentical(Object other)
   {
    if (other instanceof ShipmentValue)
    {
     ShipmentValue that = (ShipmentValue) other;
     boolean lEquals = true;
     if( this.time == null )
     {
      lEquals = lEquals && ( that.time == null );
     }
     else
     {
      lEquals = lEquals && this.time.equals( that.time );
     }
     if( this.description == null )
     {
      lEquals = lEquals && ( that.description == null );
     }
     else
     {
      lEquals = lEquals && this.description.equals( that.description );
     }
     lEquals = lEquals && this.type == that.type;
     lEquals = lEquals && this.customerContactPerson_customer_number == that.customerContactPerson_customer_number;

     return lEquals;
    }
    else
    {
     return false;
    }
   }

   public int hashCode(){
    int result = 17;
      result = 37*result + ((this.time != null) ? this.time.hashCode() : 0);

      result = 37*result + ((this.description != null) ? this.description.hashCode() : 0);

      result = 37*result + (int) number;

      result = 37*result + (int) type;

      result = 37*result + (int) mode;

      result = 37*result + (int) customerContactPerson_customer_number;

    return result;
   }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.