com.jwpepper.inv
Class AnnotationImpl

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--com.imaginary.lwp.BaseEntity
                          |
                          +--com.jwpepper.inv.AnnotationImpl

public class AnnotationImpl
extends BaseEntity
implements Annotation

This class implements the Annotation Object.
Last Modified $Date: 1999/10/05 21:05:43 $

Version:
$Revision: 1.5 $
Author:
Robert Schmid (robert@ancept.com)
See Also:
Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
AnnotationImpl()
          Constructor method.
 
Method Summary
 void addProduct(Identifier id, Product prd)
          This method adds a Product to a collection of Products that the Annotation belongs to.
 void create(Identifier id, java.util.Locale loc, java.lang.String txt, java.lang.String mime)
          This method creates a new Annotation Object and sets its attributes.
 java.util.Locale getLocale()
          This method returns the Locale Object.
 java.lang.String getMimeType()
          This method returns the Annotation String.
 java.lang.String getText()
          This method returns the Annotation String.
protected  void load(Memento mem)
          This method loads the Annotation's attributes from a Memento Object
 com.sun.java.util.collections.Iterator products()
          This method returns an iterator over the products collection.
 void removeProduct(Identifier id, Product prd)
          This method removes a Product from a collection of Products that the Annotation belongs to.
protected  void store(Memento mem)
          This method stores the Annotation's attributes into a Memento Object
 
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

AnnotationImpl

public AnnotationImpl()
               throws java.rmi.RemoteException,
                      PersistenceException
Constructor method.
Throws:
PersistenceException - If an error occurs in the Lightweight Persistence Engine
java.rmi.RemoteException - If an error occurs in the Remote Method Interface
Method Detail

addProduct

public void addProduct(Identifier id,
                       Product prd)
                throws PersistenceException,
                       java.rmi.RemoteException
This method adds a Product to a collection of Products that the Annotation belongs to.
Specified by:
addProduct in interface Annotation
Parameters:
id - An identifer object for the Annotation
prd - A Product object to add to the collection
Throws:
PersistenceException - If an error occurs in the Lightweight Persistence Engine
java.rmi.RemoteException - If an error occurs in the Remote Method Interface

create

public void create(Identifier id,
                   java.util.Locale loc,
                   java.lang.String txt,
                   java.lang.String mime)
            throws PersistenceException
This method creates a new Annotation Object and sets its attributes.
Specified by:
create in interface Annotation
Parameters:
id - An identifer object for the Annotation
loc - Country/Language Information
txt - The text of the Annotation
mime - The mimetype of the Annotation
Throws:
PersistenceException - If an error occurs in the Lightweight Persistence Engine
java.rmi.RemoteException - If an error occurs in the Remote Method Interface

products

public com.sun.java.util.collections.Iterator products()
                                                throws java.rmi.RemoteException
This method returns an iterator over the products collection.
Specified by:
products in interface Annotation
Returns:
An iterator of the Products collection

getLocale

public java.util.Locale getLocale()
This method returns the Locale Object.
Specified by:
getLocale in interface Annotation
Returns:
A Locale Object
Throws:
java.rmi.RemoteException - If an error occurs in the Remote Method Interface

getText

public java.lang.String getText()
This method returns the Annotation String.
Specified by:
getText in interface Annotation
Returns:
A String containing the text of the Annotation
Throws:
java.rmi.RemoteException - If an error occurs in the Remote Method Interface

getMimeType

public java.lang.String getMimeType()
This method returns the Annotation String.
Specified by:
getMimeType in interface Annotation
Returns:
A String containing the MimeType of the Annotation
Throws:
java.rmi.RemoteException - If an error occurs in the Remote Method Interface

load

protected void load(Memento mem)
             throws LoadException
This method loads the Annotation's attributes from a Memento Object
Parameters:
mem - A Memento Object
Throws:
LoadException - If an error occurs while loading the Memento Object
Overrides:
load in class BaseEntity

removeProduct

public void removeProduct(Identifier id,
                          Product prd)
                   throws java.rmi.RemoteException,
                          PersistenceException
This method removes a Product from a collection of Products that the Annotation belongs to.
Specified by:
removeProduct in interface Annotation
Parameters:
id - An identifer object for the Annotation
prd - A Product object to add to the collection
Throws:
PersistenceException - If an error occurs in the Lightweight Persistence Engine
java.rmi.RemoteException - If an error occurs in the Remote Method Interface

store

protected void store(Memento mem)
              throws StoreException
This method stores the Annotation's attributes into a Memento Object
Parameters:
mem - A Memento Object
Throws:
StoreException - If an error occurs while storing the Memento Object
Overrides:
store in class BaseEntity