|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.RemoteObject | +--java.rmi.server.RemoteServer | +--java.rmi.server.UnicastRemoteObject | +--com.imaginary.lwp.BaseEntity | +--com.jwpepper.inv.ProductImpl
Implements the business logic associated with the J.W. Pepper
product business component.
Last modified $Date: 1999/10/04 15:31:31 $
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary | |
ProductImpl()
Empty constructor for instantiating a new ProductImpl
instance. |
Method Summary | |
void |
addAnnotation(Identifier id,
java.lang.String aud,
AnnotationReference ann)
Adds an annotation of the specified audience type to the list of annotations that describe this product. |
void |
addChild(Identifier id,
Product prd)
Adds a product as a child of this product. |
com.sun.java.util.collections.Iterator |
annotations()
Provides a complete list of all annotations describing this product. |
protected void |
cascadeRemove(Identifier id)
Notifies all parts of a product that this product has been removed. |
com.sun.java.util.collections.Iterator |
children()
Provides all of the children of this product. |
void |
create(Identifier id,
ManufacturerReference mfg,
java.lang.String mfgcode,
java.lang.String nom,
double prix)
Initializes a newly created product within the context of a new transaction that marks the product for creation into the data store. |
void |
create(Identifier id,
ManufacturerReference mfg,
java.lang.String mfgcode,
java.lang.String nom,
double prix,
ProductReference prnt)
Initializes a newly created product within the context of a new transaction that marks the product for creation into the data store. |
AnnotationReference |
getAnnotation(java.lang.String aud,
java.util.Locale loc)
Provides the annotation for the specified audience type and translated for the specified locale. |
ManufacturerReference |
getManufacturer()
Provides a reference to the manufacturer of this product. |
java.lang.String |
getManufacturerCode()
Provides the manufacturer's identifier that uniquely identifies this product for the manufacturer. |
java.lang.String |
getName(java.util.Locale loc)
Provides the name of this product translated for the specified locale. |
ProductReference |
getParent()
Provides the parent of this product. |
double |
getPrice()
Provide the base price for this product. |
boolean |
isInStock()
Determines if this product is currently in stock. |
protected void |
load(Memento mem)
Loads the state of this product from the specified memento. |
void |
removeAnnotation(Identifier id,
AnnotationReference ann)
Removes the specified annotation from the list of annotations describing this product. |
void |
removeChild(Identifier id,
Product prd)
Removes the specified child from the list of this product's children. |
void |
removeParent(Identifier id,
Product prd)
Sets the parent to null is the specified product
is the current parent. |
protected void |
store(Memento mem)
Stores the current state of this product into the specified memento for storage in a data store. |
Methods inherited from class com.imaginary.lwp.BaseEntity |
create,
getLastUpdateID,
getLastUpdateTime,
getObjectID,
getReference,
load,
reload,
remove,
save,
store |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone,
exportObject,
exportObject,
exportObject,
unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost,
getLog,
setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals,
getRef,
hashCode,
toString,
toStub |
Methods inherited from class java.lang.Object |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public ProductImpl() throws PersistenceException, java.rmi.RemoteException
ProductImpl
instance. This constructor should be the only constructor for
this class.Method Detail |
public void addAnnotation(Identifier id, java.lang.String aud, AnnotationReference ann) throws PersistenceException
id
- the client identifier for the transactionaud
- the audience type that describes who should see the
annotationann
- the annotation to be addedpublic void addChild(Identifier id, Product prd) throws IllegalProductRelationException, PersistenceException, java.rmi.RemoteException
id
- the client identifier for the transactionprd
- the child productpublic com.sun.java.util.collections.Iterator annotations()
protected void cascadeRemove(Identifier id) throws RemoveException
remove()
transaction
automatically to provide the business object with the
opportunity to clean itself up. This method specifically triggers
the folllowing:
removeProduct()
in all annotations removeParent()
in all (if any) children removeChild()
in any parent id
- the client identifier for the transactionpublic com.sun.java.util.collections.Iterator children()
public void create(Identifier id, ManufacturerReference mfg, java.lang.String mfgcode, java.lang.String nom, double prix) throws CreateException, java.rmi.RemoteException
id
- the client identifier for the transactionmfg
- the manufacturer of the productmfgcode
- the manufacturer's product identifiernom
- the name of the product for the default localeprix
- the price of the productpublic void create(Identifier id, ManufacturerReference mfg, java.lang.String mfgcode, java.lang.String nom, double prix, ProductReference prnt) throws CreateException, java.rmi.RemoteException
id
- the client identifier for the transactionmfg
- the manufacturer of the productmfgcode
- the manufacturer's product identifiernom
- the name of the product for the default localeprix
- the price of the productprnt
- the parent of this productpublic AnnotationReference getAnnotation(java.lang.String aud, java.util.Locale loc)
aud
- the audience type desiredloc
- the locale of the desired translationpublic ManufacturerReference getManufacturer()
public java.lang.String getManufacturerCode()
public java.lang.String getName(java.util.Locale loc)
loc
- the locale of the desired translationpublic ProductReference getParent()
public double getPrice()
public boolean isInStock()
protected void load(Memento mem) throws LoadException
mem
- the memento containing the current state of the productpublic void removeAnnotation(Identifier id, AnnotationReference ann) throws PersistenceException
id
- the client identifier for this transactionann
- the annotation to be removedpublic void removeChild(Identifier id, Product prd) throws PersistenceException, java.rmi.RemoteException
id
- the client identifier for this transactionprd
- the product to be removedpublic void removeParent(Identifier id, Product prd) throws PersistenceException, java.rmi.RemoteException
null
is the specified product
is the current parent.id
- the client identifier for this transactionprd
- the product to be removed as parentprotected void store(Memento mem) throws StoreException
mem
- the memento into which the state is stored
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |