/*
 * Generated by XCodeGen v1.0
 * Sun Jul 07 16:05:41 EDT 2002
 */

package xcodegen.sample.domain.dto;

import java.io.Serializable;

/**
 * Item of an order
 *
 * @author Herve Tchepannou
 * @version 
 */
public class OrderItemDTO
    extends xcodegen.sample.domain.dto.PersonDTO
    implements Serializable
{

///////////////////////////////////////////////////
// Fields
///////////////////////////////////////////////////


    /**  */
    private int id;

    /**  */
    private String description;

    /**  */
    private double unitPrice;

    /**  */
    private int quantity;

    /**  */
    private int orderId;


///////////////////////////////////////////////////
// Constructors
///////////////////////////////////////////////////

    public OrderItemDTO ()
    {
    }
    

    
///////////////////////////////////////////////////
// Public methods
///////////////////////////////////////////////////

    public boolean equals( Object obj )
    {
        if ( ( obj != null ) && ( obj.getClass() == getClass() ) )
        {
            return toString().equals( obj.toString() );
        }
        else
        {
            return false;
        }
    }
    
    public String toString()
    {
        StringBuffer buff = new StringBuffer();
        buff.append( getClass().getName() ).append( "{" );
        
        
        buff.append( "id=" ).append( getId () );
            
        buff.append( "," ).append( "description=" ).append( getDescription () );
            
        buff.append( "," ).append( "unitPrice=" ).append( getUnitPrice () );
            
        buff.append( "," ).append( "quantity=" ).append( getQuantity () );
            
        buff.append( "," ).append( "orderId=" ).append( getOrderId () );
    
        buff.append( "}" );
        return buff.toString();
    }

    public java.util.Collection validate()
    {

        java.util.Collection errors = super.validate();


        return errors;
    }
        


///////////////////////////////////////////////////
// accessor methods for attributes
///////////////////////////////////////////////////

    
    /**
     * Getter of <code>id</code>
     * @see #id
     */
    public int getId () { return this.id; }
    
    /** 
     * Setter of <code>id</code>
     * @see #id
     */
    public void setId ( int value ) { this.id = value; }
    
    /**
     * Getter of <code>description</code>
     * @see #description
     */
    public String getDescription () { return this.description; }
    
    /** 
     * Setter of <code>description</code>
     * @see #description
     */
    public void setDescription ( String value ) { this.description = value; }
    
    /**
     * Getter of <code>unitPrice</code>
     * @see #unitPrice
     */
    public double getUnitPrice () { return this.unitPrice; }
    
    /** 
     * Setter of <code>unitPrice</code>
     * @see #unitPrice
     */
    public void setUnitPrice ( double value ) { this.unitPrice = value; }
    
    /**
     * Getter of <code>quantity</code>
     * @see #quantity
     */
    public int getQuantity () { return this.quantity; }
    
    /** 
     * Setter of <code>quantity</code>
     * @see #quantity
     */
    public void setQuantity ( int value ) { this.quantity = value; }
    
    /**
     * Getter of <code>orderId</code>
     * @see #orderId
     */
    public int getOrderId () { return this.orderId; }
    
    /** 
     * Setter of <code>orderId</code>
     * @see #orderId
     */
    public void setOrderId ( int value ) { this.orderId = value; }
}
