com.jwpepper.inv
Class ProductEntryItemImpl
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--com.imaginary.lwp.BaseEntity
|
+--com.jwpepper.inv.ProductEntryItemImpl
- public class ProductEntryItemImpl
- extends BaseEntity
- implements EntryItem
Provides a view of J.W. Pepper products for a J.W. Pepper catalog.
A ProductEntryItem
implements the methods of
EntryItem
to delegate to a J.W. Pepper product.
Last modified $Date: 1999/10/06 21:44:04 $
- Version:
- $Revision: 1.2 $
- Author:
- George Reese (george@ancept.com)
- See Also:
- Serialized Form
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Method Summary |
java.lang.String |
getDescription(java.util.Locale loc)
Provides a description of the product translated for the specified
locale. |
SimpleEntryReference |
getEntry()
Provides the entry that owns this entry item. |
java.lang.String |
getLineDescription(java.util.Locale loc)
Provides a single line description of the product as it should
appear as a line item in a catalog. |
double |
getPrice()
Provides the price of the associated product as it will appear in
the catalog. |
ProductReference |
getProduct()
Provides the product with which this entry item is associated. |
java.util.Properties |
getProperties()
Provides a shallow copy of the properties associated with this
entry. |
java.lang.String |
getTitle(java.util.Locale loc)
Provides the title of the entry item. |
protected void |
load(Memento mem)
Loads the entry item from the specified memento. |
protected void |
store(Memento mem)
Stores the current state of the product entry item in the
specified memento. |
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 |
ProductEntryItemImpl
public ProductEntryItemImpl()
throws PersistenceException,
java.rmi.RemoteException
- Empty constructor required for entities by LWP.
- Parameters:
java.rmi.RemoteException
- RMI was unable to export this object- Throws:
- PersistenceException - LWP was unable to assign
a persistence handler
getDescription
public java.lang.String getDescription(java.util.Locale loc)
- Provides a description of the product translated for the specified
locale.
- Specified by:
- getDescription in interface EntryItem
- Parameters:
loc
- the desired locale- Returns:
- product description
getEntry
public SimpleEntryReference getEntry()
- Provides the entry that owns this entry item.
- Specified by:
- getEntry in interface EntryItem
- Returns:
- the owning entry
getLineDescription
public java.lang.String getLineDescription(java.util.Locale loc)
- Provides a single line description of the product as it should
appear as a line item in a catalog. Currently, line descriptions
are in the form of:
OBJECTID-CATALOG#-TITLE....PRICE
- Specified by:
- getLineDescription in interface EntryItem
- Parameters:
loc
- the locale for which the description should be translated- Returns:
- the line description
getPrice
public double getPrice()
- Provides the price of the associated product as it will appear in
the catalog. This price originally comes from the product itself,
but it may be changed by the catalog builder to reflect differences
between today's product price and the price of the product at
the time of catalog publication.
- Returns:
- the price
getProduct
public ProductReference getProduct()
throws java.rmi.RemoteException
- Provides the product with which this entry item is associated.
- Returns:
- the associated product
getProperties
public java.util.Properties getProperties()
- Provides a shallow copy of the properties associated with this
entry. The
ProductEntryItemImpl
class uses the following
properties:
-
price
- The price associated with the product for this entry.
-
product
- The
objectID
of the associated product as a
String
- Specified by:
- getProperties in interface EntryItem
- Returns:
- the properties associated with this entry item
getTitle
public java.lang.String getTitle(java.util.Locale loc)
- Provides the title of the entry item.
- Specified by:
- getTitle in interface EntryItem
- Parameters:
loc
- the locale for a title translation- Returns:
- the title
load
protected void load(Memento mem)
throws LoadException
- Loads the entry item from the specified memento.
- Parameters:
mem
- the memento with the entry item's state- Throws:
- LoadException - an error occurred
loading the object from the data store
- Overrides:
- load in class BaseEntity
store
protected void store(Memento mem)
throws StoreException
- Stores the current state of the product entry item in the
specified memento.
- Parameters:
mem
- the memento into which to store the object state- Throws:
- StoreException - an error occurred
storing the item's state
- Overrides:
- store in class BaseEntity