|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.imaginary.lwp.PersistenceSupport | +--com.imaginary.lwp.JDBCSupport | +--com.jwpepper.inv.ProductSupport
Provides database access for persistence operations related to the
product business component. For the initial release of the catalog
system, the product class is really abstract, with the concrete
class being the PepperProduct
class. As a result,
this class only performs SQL INSERT, DELETE, and UPDATE operations.
Last modified $Date: 1999/10/05 15:26:44 $
Field Summary | |
static java.lang.String |
CREATE
The SQL INSERT statement. |
static java.lang.String |
LOAD_ANNOTATIONS
SQL statement for loading annotations |
static java.lang.String |
LOAD_CHILDREN
SQL statement for loading children. |
static java.lang.String |
REMOVE
The SQL DELETE statement. |
static java.lang.String |
REMOVE_ANNOTATIONS
The SQL to remove annotations for a product. |
static java.lang.String |
SAVE_ANNOTATIONS
The SQL to save annotations for a product. |
static java.lang.String |
STORE
The SQL UPDATE statement. |
Constructor Summary | |
ProductSupport()
|
Method Summary | |
void |
create(Transaction trans,
Memento mem)
Creates the product represented by the specified memento in the database. |
JDBCJoin |
getJoin(java.lang.String tbl)
Joins the MANUFACTURER table to the PRODUCT table for searches. |
java.lang.String |
getPrimaryTable()
|
void |
load(Transaction trans,
Memento mem)
This method is left empty since the Product class
is not currently used as a concrete class. |
protected com.sun.java.util.collections.HashMap |
loadAnnotations(Transaction trans,
long oid)
Loads all annotations associated with the named product. |
protected com.imaginary.util.DistributedList |
loadChildren(Transaction trans,
long oid)
|
protected java.lang.String |
mapField(java.lang.String fld)
Maps the fields used in a search to actual database fields. |
void |
remove(Transaction trans,
Memento mem)
Deletes the product represented by the data in the specified memento from the database. |
protected void |
saveAnnotations(Transaction trans,
long oid,
com.sun.java.util.collections.HashMap ann)
Saves the annotations associated with the product. |
void |
store(Transaction trans,
Memento mem)
Stores the product whose state is contained in the specified memento into the database. |
Methods inherited from class com.imaginary.lwp.JDBCSupport |
find,
getFindSQL,
getReference |
Methods inherited from class com.imaginary.lwp.PersistenceSupport |
generateID |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String CREATE
public static final java.lang.String LOAD_ANNOTATIONS
public static final java.lang.String LOAD_CHILDREN
public static final java.lang.String REMOVE
public static final java.lang.String REMOVE_ANNOTATIONS
public static final java.lang.String SAVE_ANNOTATIONS
public static final java.lang.String STORE
Constructor Detail |
public ProductSupport()
Method Detail |
public void create(Transaction trans, Memento mem) throws CreateException
trans
- the transaction objectmem
- the memento containing the state of the product to be savedpublic JDBCJoin getJoin(java.lang.String tbl)
tbl
- the MANUFACTURER tablepublic java.lang.String getPrimaryTable()
public void load(Transaction trans, Memento mem) throws LoadException
Product
class
is not currently used as a concrete class.trans
- unusedmem
- unusedprotected com.sun.java.util.collections.HashMap loadAnnotations(Transaction trans, long oid) throws LoadException
trans
- the transaction to use for the loadoid
- the objectID
of the product whose annotations
are to be loadedprotected com.imaginary.util.DistributedList loadChildren(Transaction trans, long oid) throws LoadException
protected java.lang.String mapField(java.lang.String fld) throws FindException
fld
- the search fieldpublic void remove(Transaction trans, Memento mem) throws RemoveException
trans
- the transaction objectmem
- the memento containing the product stateprotected void saveAnnotations(Transaction trans, long oid, com.sun.java.util.collections.HashMap ann) throws java.sql.SQLException
trans
- the transaction in which the save should occuroid
- the objectID
of the product whose annotations
are being savedpublic void store(Transaction trans, Memento mem) throws StoreException
trans
- the transaction objectmem
- the memento containing the product's state
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |