com.jwpepper.inv
Class ManufacturerSupport
java.lang.Object
|
+--com.imaginary.lwp.PersistenceSupport
|
+--com.imaginary.lwp.JDBCSupport
|
+--com.jwpepper.inv.ManufacturerSupport
- public class ManufacturerSupport
- extends JDBCSupport
Provides all persistence support for the manufacturer business component.
Last modified $Date: 1999/10/05 15:26:44 $
- Version:
- $Revision
- Author:
- Neophytos Iacovou (iacovou@ancept.com)
Constructor Summary |
ManufacturerSupport()
Constructs a new support object for manufacturer components. |
Method Summary |
void |
create(Transaction trans,
Memento mem)
Inserts the manufacturer whose state is represented by the specified
memento into the database. |
protected JDBCJoin |
getJoin(java.lang.String tbl)
Given a table, this method returns a JDBCJoin
object that represents the mapping of the MANUFACTURER
table to the specified table. |
protected java.lang.String |
getPrimaryTable()
|
void |
load(Transaction trans,
Memento mem)
Loads the data for a manufacturer into the specified memento. |
protected java.lang.String |
mapField(java.lang.String fld)
Maps fields used in a search to the actual database fields
on which a search should be conducted. |
void |
remove(Transaction trans,
Memento mem)
Removes the mannufacturer identified by the specified memento
from the database. |
void |
store(Transaction trans,
Memento mem)
Stores the manufacturer state contained in the specified memento
to the database. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ManufacturerSupport
public ManufacturerSupport()
- Constructs a new support object for manufacturer components.
create
public void create(Transaction trans,
Memento mem)
throws CreateException
- Inserts the manufacturer whose state is represented by the specified
memento into the database.
- Parameters:
trans
- the transaction for this operationmem
- the memento containing the state of the manufacturer in
question- Throws:
- CreateException -
- Overrides:
- create in class PersistenceSupport
getJoin
protected JDBCJoin getJoin(java.lang.String tbl)
- Given a table, this method returns a
JDBCJoin
object that represents the mapping of the MANUFACTURER
table to the specified table.
- Parameters:
tbl
- the table to be mapped- Returns:
- the join object
- Overrides:
- getJoin in class JDBCSupport
getPrimaryTable
protected java.lang.String getPrimaryTable()
- Returns:
- "MANUFACTURER"
- Overrides:
- getPrimaryTable in class JDBCSupport
mapField
protected java.lang.String mapField(java.lang.String fld)
throws FindException
- Maps fields used in a search to the actual database fields
on which a search should be conducted.
- Parameters:
fld
- the search field- Returns:
- the matching database column
- Throws:
- FindException - an error occurred mapping
the specified field
- Overrides:
- mapField in class JDBCSupport
load
public void load(Transaction trans,
Memento mem)
throws LoadException
- Loads the data for a manufacturer into the specified memento.
The memento contains the
objectID
of the desired
manufacturer when the method is called. This method uses
that information to load a specific manufacturer.
- Parameters:
trans
- the transaction objectmem
- a memento into which the manufacturer data is loaded- Throws:
- LoadException - an error occurred
loading the data from the database
- Overrides:
- load in class PersistenceSupport
remove
public void remove(Transaction trans,
Memento mem)
throws RemoveException
- Removes the mannufacturer identified by the specified memento
from the database.
- Parameters:
trans
- the transaction objectmem
- the memento containing information about the object to be
deleted- Throws:
- RemoveException - an error occurred removing
the object from the database
- Overrides:
- remove in class PersistenceSupport
store
public void store(Transaction trans,
Memento mem)
throws StoreException
- Stores the manufacturer state contained in the specified memento
to the database.
- Parameters:
trans
- the transaction objectmem
- the memento containing the state of the manufacturer to be
saved- Throws:
- StoreException - a database error occurred
in attempting to store the manufacturer
- Overrides:
- store in class PersistenceSupport