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


public class ShipBean extends Object implements javax.ejb.EntityBean

Fields Summary
public int
public String
public int
public double
public javax.ejb.EntityContext
Constructors Summary
Methods Summary
public voidejbActivate()

public ShipPKejbCreate(int id, java.lang.String name, int capacity, double tonnage) = id; = name;
        this.capacity = capacity;
        this.tonnage = tonnage;
        return null;
public ShipPKejbCreate(int id, java.lang.String name) = id; = 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;