/*
 * Copyright (c) 2004, 2005, ADAPT project partners (IST-2001-37126).
 * 
 * PurchaseOrderBean.java
 */

package org.eu.adapt.demonstrator.eb.retailer;

import java.util.Collection;
import javax.ejb.CreateException;
import javax.ejb.EntityContext;
import javax.ejb.EntityBean;

import org.eu.adapt.demonstrator.util.UniqueIdentifierGenerator;

public abstract class PurchaseOrderBean implements EntityBean
{
    public String ejbCreate(CustomerReferenceLocal customerReference)
        throws CreateException
    {
        setNumber(UniqueIdentifierGenerator.createUniqueIdentifier());

        return null;
    }

    public void ejbPostCreate(CustomerReferenceLocal customerReference)
    {
        setCustomerReference(customerReference);
    }

    public abstract void setNumber(String number);

    public abstract String getNumber();

    public abstract void setCustomerReference(CustomerReferenceLocal customerReference);

    public abstract CustomerReferenceLocal getCustomerReference();

    public abstract void setPurchaseOrderItems(Collection purchaseOrderItems);

    public abstract Collection getPurchaseOrderItems();

    public void setEntityContext(EntityContext entityContext)
    {
    }

    public void unsetEntityContext()
    {
    }

    public void ejbActivate()
    {
    }

    public void ejbPassivate()
    {
    }

    public void ejbLoad()
    {
    }

    public void ejbStore()
    {
    }    

    public void ejbRemove()
    {
    }
}
