com.jwpepper.inv
Class ManufacturerReference

java.lang.Object
  |
  +--com.imaginary.lwp.BaseReference
        |
        +--com.jwpepper.inv.ManufacturerReference

public class ManufacturerReference
extends BaseReference

The LWP reference class for the manufacturer business component. This class is a serialized class that is used as a stand-in for the actual ManufacturerImpl class. It implements data caching and failover support to simplify the client interface to the business object.
Last modified $Date: 1999/10/05 15:26:44 $

Version:
$Revision
Author:
Neophytos Iacovou (iacovou@ancept.com), George Reese (george@ancept.com)
See Also:
Serialized Form

Constructor Summary
ManufacturerReference()
          Empty constructor required by serialization.
ManufacturerReference(long oid)
          Constructs a new ManufacturerReference instance that will delegate to the ManufacturerImpl with the specified objectID.
ManufacturerReference(Manufacturer ent)
          Constructs a reference class for the specified entity.
 
Method Summary
 void addProduct(Identifier id, Product prd)
          Delegates to the manufacturer entity associated with this reference by calling its addProduct() method.
 void assign(long oid, com.sun.java.util.collections.HashMap vals)
          Assigns a reference class that refers to the manufacturer business object described by the specified HashMap.
 java.lang.String getCode()
          Delegates to the manufacturer entity associated with this reference and returns the return value from its getCode() method.
 java.lang.String getName(java.util.Locale loc)
          Delegates to the manufacturer entity associated with this reference and returns the return value from its getName() method.
 com.sun.java.util.collections.Iterator products()
          Delegates to the manufacturer entity associated with this reference and returns the return value from its products() method.
 void removeProduct(Identifier id, Product prd)
          Delegates to the associated entity's removeProduct method.
 
Methods inherited from class com.imaginary.lwp.BaseReference
assign, assign, get, getEntity, getLastUpdateID, getLastUpdateTime, getObjectID, put, reconnect
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManufacturerReference

public ManufacturerReference()
Empty constructor required by serialization.

ManufacturerReference

public ManufacturerReference(long oid)
Constructs a new ManufacturerReference instance that will delegate to the ManufacturerImpl with the specified objectID.
Parameters:
oid - the objectID of the manufacturer this reference represents

ManufacturerReference

public ManufacturerReference(Manufacturer ent)
                      throws java.rmi.RemoteException
Constructs a reference class for the specified entity.
Parameters:
ent - the entity for which this reference exists
Throws:
java.rmi.RemoteException - a network error occurred
Method Detail

assign

public void assign(long oid,
                   com.sun.java.util.collections.HashMap vals)
Assigns a reference class that refers to the manufacturer business object described by the specified HashMap.
Parameters:
oid - the objectID of the manufacturer
vals - the values that describe this reference's entity
Overrides:
assign in class BaseReference

addProduct

public void addProduct(Identifier id,
                       Product prd)
                throws PersistenceException,
                       java.rmi.RemoteException
Delegates to the manufacturer entity associated with this reference by calling its addProduct() method.
Parameters:
id - the client identifier
prd - the product to be added
Throws:
java.rmi.RemoteException - a network error occurred

getCode

public java.lang.String getCode()
                         throws java.rmi.RemoteException
Delegates to the manufacturer entity associated with this reference and returns the return value from its getCode() method.
Returns:
the manufacturer code for this manufacturer
Throws:
java.rmi.RemoteException - a network error occurred

getName

public java.lang.String getName(java.util.Locale loc)
                         throws java.rmi.RemoteException
Delegates to the manufacturer entity associated with this reference and returns the return value from its getName() method.
Parameters:
loc - the locale for which the name should be translated
Returns:
the name of this manufacturer
Throws:
java.rmi.RemoteException - a network error occurred

products

public com.sun.java.util.collections.Iterator products()
                                                throws java.rmi.RemoteException
Delegates to the manufacturer entity associated with this reference and returns the return value from its products() method.
Returns:
the products associated with this manufacturer
Throws:
java.rmi.RemoteException - a network error occurred

removeProduct

public void removeProduct(Identifier id,
                          Product prd)
                   throws PersistenceException,
                          java.rmi.RemoteException
Delegates to the associated entity's removeProduct method.
Parameters:
id - the client identifier
prd - the product to be removed
Throws:
PersistenceException - a transactional error occurred
java.rmi.RemoteException - a network error occurred