db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb/tutorial5 Product.java
Date Sun, 30 Mar 2003 20:12:10 GMT
thma        2003/03/30 12:12:10

  Added:       src/test/org/apache/ojb/tutorial5 Product.java
  Log:
  move the jdo test entity to this place
  
  Revision  Changes    Path
  1.1                  db-ojb/src/test/org/apache/ojb/tutorial5/Product.java
  
  Index: Product.java
  ===================================================================
  package org.apache.ojb.tutorial5;
  
  import java.io.Serializable;
  
  /** represents product objects in the tutorial system*/
  public class Product implements Serializable{
  
  	/**artificial primary key atribute*/
  	private int id;
  	/** product name*/
  	protected String name;
  
  
  	/** price per item*/
  	protected double price;
  	/** stock of currently available items*/
  	protected int stock;
  
  
  
  	public Product(){
  
  	}
  
  	public Product( int _id, String name, double price, int stock) {
  		this.price = price;
  		this.stock = stock;
  		this.name = name;
  		this.id = _id;
  	}
  
  
  
  
  
  	/**
  	 * Insert the method's description here.
  	 * Creation date: (04.03.2001 11:13:27)
  	 * @return int
  	 */
  	public int getId() {
  		return id;
  	}
  
  	/**
  	 * Insert the method's description here.
  	 * Creation date: (04.03.2001 10:57:36)
  	 * @return java.lang.String
  	 */
  	public String getName() {
  		return name;
  	}
  
  	/**
  	 * Insert the method's description here.
  	 * Creation date: (04.03.2001 10:57:36)
  	 * @return double
  	 */
  	public double getPrice() {
  		return price;
  	}
  
  	/**
  	 * Insert the method's description here.
  	 * Creation date: (04.03.2001 10:57:36)
  	 * @return int
  	 */
  	public int getStock() {
  		return stock;
  	}
  
  	/**
  	 * Insert the method's description here.
  	 * Creation date: (04.03.2001 11:13:27)
  	 * @param new_id int
  	 */
  	public void setId(int new_id) {
  		id = new_id;
  	}
  
  	/**
  	 * Insert the method's description here.
  	 * Creation date: (04.03.2001 10:57:36)
  	 * @param newName java.lang.String
  	 */
  	public void setName(String newName) {
  		name = newName;
  	}
  
  	/**
  	 * Insert the method's description here.
  	 * Creation date: (04.03.2001 10:57:36)
  	 * @param newPrice double
  	 */
  	public void setPrice(double newPrice) {
  		price = newPrice;
  	}
  
  	/**
  	 * Insert the method's description here.
  	 * Creation date: (04.03.2001 10:57:36)
  	 * @param newStock int
  	 */
  	public void setStock(int newStock) {
  		stock = newStock;
  	}
  
  	/**
  	 * Insert the method's description here.
  	 * Creation date: (04.03.2001 10:57:36)
  	 * @return int
  	 */
  	public String toString() {
  		return "[" + id + "] " + name + "\t\t\t price: " + price + "\t\t stock: " + stock;
  	}
  }
  
  
  

Mime
View raw message