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

📄 productitem.java

📁 EJB实践的服务器是用SUN的服务器
💻 JAVA
字号:
package examples;

import java.sql.*;
import javax.naming.*;
import javax.ejb.*;
import java.util.*;
import java.rmi.RemoteException;
import javax.naming.*;

/**
 * A productitem is details about the product.
 * 
 */

public class ProductItem implements java.io.Serializable {
    
    /*
     * Base price of the product
     */
    private double basePrice;
    
    /*
     * Name of the product
     */
    private String name;
    
    /*
     * Description of the product
     */
    private String description;
    
    /*
     * Product id
     */
    private String productId;
    
    /**
     * Constructor
     * @param productid
     * @param name of the product
     * @param price of the product
     * @param description of the product
     */ 
    public ProductItem(String productId, String name, double price,String description) {
        System.out.println("ProductItem(...) called");
        this.productId = productId;
        this.basePrice = price;
        this.name = name;
        this.description=description;
	}
    
    /**
     * Returns the product id.
     */
    public String getProductID(){
        return productId;
    }
    
    /*
     * Sets the product id.
     */
    public void setProductID(String productId){
        this.productId=productId;
    }
  
    /**
     * Returns the name of the product.
     */
    public String getName(){
        return name;
    }
 
    /**
     * Sets the name of the product.
     */
    public void setName(String name){
        this.name=name;
    }
  
    /**
     * Returns the description of the product.
     */
    public String getDescription(){
        return description;
    }
    
    /**
     * Sets the description of the product.
     */
    public void setDescription(String description){
        this.description=description;
    }

    /**
     * Returns the base price of the product.
     */
    public double getBasePrice(){
        return basePrice;
    }
    
    /**
     * Sets the base price of the product.
     */
    public void setBasePrice(double price){
        this.basePrice=price;
    }
		
}

⌨️ 快捷键说明

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