FileDocCategorySizeDatePackage
ShipBean.javaAPI DocExample1830Fri Jul 06 19:38:18 BST 2001com.titan.ship

ShipBean

public class ShipBean extends Object implements javax.ejb.EntityBean

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

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

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

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

public voidejbPassivate()

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

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

        ShipRemote myself = (ShipRemote)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;