FileDocCategorySizeDatePackage
Item.javaAPI DocJBoss 4.2.13601Fri Jul 13 20:55:58 BST 2007xpetstore.domain.catalog.ejb

Item

public class Item extends Object
ejb.bean name="Item" type="CMP" view-type="local" primkey-field="itemId" schema="Item" cmp-version="${ejb.cmp.version}"
ejb.value-object name="Item" match="*"
ejb.transaction type="Required"
ejb.persistence table-name="T_ITEM"
jboss.persistence create-table="${jboss.create.table}" remove-table="${jboss.remove.table}"

Fields Summary
private String
itemId
private String
status
private double
listPrice
private double
unitCost
private String
imagePath
private Product
product
Constructors Summary
public Item()

      
   
Methods Summary
public java.lang.StringgetDescription()

ejb.persistence column-name="description" jdbc-type="VARCHAR" sql-type="varchar(255)"

       return status;
    
public java.lang.StringgetImagePath()

ejb.persistence column-name="imagePath" jdbc-type="VARCHAR" sql-type="varchar(255)"

       return imagePath;
    
public java.lang.StringgetItemId()

ejb.pk-field
ejb.persistence column-name="itemId" jdbc-type="VARCHAR" sql-type="varchar(10)"
ejb.interface-method
ejb.transaction type="Supports"

      return itemId;
   
public doublegetListPrice()

ejb.persistence column-name="listPrice"

       return listPrice;
    
public ProductgetProduct()

ejb.interface-method
ejb.relation name="product-items" role-name="item-belongs_to-product" cascade-delete="yes"
jboss.relation fk-column="product_fk" related-pk-field="productId" fk-contraint="${db.foreign.key}
weblogic.column-map foreign-key-column="product_fk"

       return product;
    
public doublegetUnitCost()

ejb.persistence column-name="unitCost"

       return unitCost;
    
public voidsetDescription(java.lang.String status)

       this.status = status;
    
public voidsetImagePath(java.lang.String imagePath)

       this.imagePath = imagePath;
    
public voidsetItemId(java.lang.String itemId)

       this.itemId = itemId;
    
public voidsetListPrice(double listPrice)

       this.listPrice = listPrice;
    
public voidsetProduct(Product product)

       this.product = product;
    
public voidsetUnitCost(double unitCost)

       this.unitCost = unitCost;
    
public java.lang.StringtoString()

       StringBuffer buffer = new StringBuffer(200);
       buffer.append("[Item: itemId " + itemId);
       buffer.append(", product " + product);
       buffer.append("]");
       
       return buffer.toString();