FileDocCategorySizeDatePackage
ShipBean.javaAPI DocExample1818Thu Dec 16 11:06:02 GMT 1999com.titan.ship

ShipBean

public class ShipBean extends Object implements javax.ejb.EntityBean

Fields Summary
public int
id
public String
name
public int
capacity
public double
tonnage
public javax.ejb.EntityContext
context
Constructors Summary
Methods Summary
public voidejbActivate()

 
public ShipPKejbCreate(int id, java.lang.String name, int capacity, double tonnage)

        this.id = id;
        this.name = name;
        this.capacity = capacity;
        this.tonnage = tonnage;
        return null;
    
public ShipPKejbCreate(int id, java.lang.String name)

        this.id = id;
        this.name = name;
        capacity = 0;
        tonnage = 0;
        return null;
    
public voidejbLoad()

 
public voidejbPassivate()

 
public voidejbPostCreate(int id, java.lang.String name, int capacity, double tonnage)

        ShipPK pk = (ShipPK)context.getPrimaryKey();
        // Do something useful with the primary key.
    
public voidejbPostCreate(int id, java.lang.String name)

        Ship myself = (Ship)context.getEJBObject();
        // Do something useful with the EJBObject reference.
    
public voidejbRemove()

 
public voidejbStore()

 
public intgetCapacity()

        return capacity;
    
public java.lang.StringgetName()

        return name;
    
public doublegetTonnage()

        return tonnage;
    
public voidsetCapacity(int cap)

        capacity = cap;
    
public voidsetEntityContext(javax.ejb.EntityContext ctx)

        context = ctx;
    
public voidsetName(java.lang.String n)

        name = n;
    
public voidsetTonnage(double tons)

        tonnage = tons;
    
public voidunsetEntityContext()

 
        context = null;