⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 abstractorderitem.java

📁 学JAVA时
💻 JAVA
字号:
/*
 * WARNING: DO NOT EDIT THIS FILE. This is a generated file that is synchronized
 * by MyEclipse Hibernate tool integration.
 *
 * Created Fri Jun 02 16:56:58 CST 2006 by MyEclipse Hibernate Tool.
 */
package com.zhang.struts.po;

import java.io.Serializable;

/**
 * A class that represents a row in the orderitem table. 
 * You can customize the behavior of this class by editing the class, {@link Orderitem()}.
 * WARNING: DO NOT EDIT THIS FILE. This is a generated file that is synchronized
 * by MyEclipse Hibernate tool integration.
 */
public abstract class AbstractOrderitem 
    implements Serializable
{
    /** The cached hash code value for this instance.  Settting to 0 triggers re-calculation. */
    private int hashValue = 0;

    /** The composite primary key value. */
    private java.lang.Integer id;

    /** The value of the orders association. */
    private Orders orders;

    /** The value of the book association. */
    private Book book;

    /** The value of the simple quantity property. */
    private java.lang.Integer quantity;

    /**
     * Simple constructor of AbstractOrderitem instances.
     */
    public AbstractOrderitem()
    {
    }

    /**
     * Constructor of AbstractOrderitem instances given a simple primary key.
     * @param id
     */
    public AbstractOrderitem(java.lang.Integer id)
    {
        this.setId(id);
    }

    /**
     * Return the simple primary key value that identifies this object.
     * @return java.lang.Integer
     */
    public java.lang.Integer getId()
    {
        return id;
    }

    /**
     * Set the simple primary key value that identifies this object.
     * @param id
     */
    public void setId(java.lang.Integer id)
    {
        this.hashValue = 0;
        this.id = id;
    }

    /**
     * Return the value of the quantity column.
     * @return java.lang.Integer
     */
    public java.lang.Integer getQuantity()
    {
        return this.quantity;
    }

    /**
     * Set the value of the quantity column.
     * @param quantity
     */
    public void setQuantity(java.lang.Integer quantity)
    {
        this.quantity = quantity;
    }

    /**
     * Return the value of the order_id column.
     * @return Orders
     */
    public Orders getOrders()
    {
        return this.orders;
    }

    /**
     * Set the value of the order_id column.
     * @param orders
     */
    public void setOrders(Orders orders)
    {
        this.orders = orders;
    }

    /**
     * Return the value of the book_id column.
     * @return Book
     */
    public Book getBook()
    {
        return this.book;
    }

    /**
     * Set the value of the book_id column.
     * @param book
     */
    public void setBook(Book book)
    {
        this.book = book;
    }

    /**
     * Implementation of the equals comparison on the basis of equality of the primary key values.
     * @param rhs
     * @return boolean
     */
    public boolean equals(Object rhs)
    {
        if (rhs == null)
            return false;
        if (! (rhs instanceof Orderitem))
            return false;
        Orderitem that = (Orderitem) rhs;
        if (this.getId() == null || that.getId() == null)
            return false;
        return (this.getId().equals(that.getId()));
    }

    /**
     * Implementation of the hashCode method conforming to the Bloch pattern with
     * the exception of array properties (these are very unlikely primary key types).
     * @return int
     */
    public int hashCode()
    {
        if (this.hashValue == 0)
        {
            int result = 17;
            int idValue = this.getId() == null ? 0 : this.getId().hashCode();
            result = result * 37 + idValue;
            this.hashValue = result;
        }
        return this.hashValue;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -