com.jwpepper.cat
Class EntrySupport
java.lang.Object
|
+--com.imaginary.lwp.PersistenceSupport
|
+--com.imaginary.lwp.JDBCSupport
|
+--com.jwpepper.cat.EntrySupport
- Direct Known Subclasses:
- CompositeEntrySupport
- public abstract class EntrySupport
- extends JDBCSupport
Supports the persistence of J.W. Pepper entry objects
Last modified $Date: 1999/10/05 04:11:16 $
- Version:
- $Revision: 1.1 $
- Author:
- George Reese (george@ancept.com)
Field Summary |
static java.lang.String |
CREATE
The SQL INSERT statement. |
static java.lang.String |
LOAD
The SQL SELECT statement. |
static java.lang.String |
REMOVE
The SQL DELETE statement. |
static java.lang.String |
STORE
The SQL UPDATE statement. |
Method Summary |
void |
create(Transaction trans,
Memento mem)
Creates the entry represented by the specified memento in the
database. |
JDBCJoin |
getJoin(java.lang.String tbl)
No joins currently supported. |
java.lang.String |
getPrimaryTable()
|
void |
load(Transaction trans,
Memento mem)
This method is left empty since the Entry class
is not currently used as a concrete class. |
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 entry represented by the data in the specified memento
from the database. |
void |
store(Transaction trans,
Memento mem)
Stores the entry whose state is contained in the specified
memento into the database. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
CREATE
public static final java.lang.String CREATE
- The SQL INSERT statement.
LOAD
public static final java.lang.String LOAD
- The SQL SELECT statement.
REMOVE
public static final java.lang.String REMOVE
- The SQL DELETE statement.
STORE
public static final java.lang.String STORE
- The SQL UPDATE statement.
EntrySupport
public EntrySupport()
create
public void create(Transaction trans,
Memento mem)
throws CreateException
- Creates the entry represented by the specified memento in the
database.
- Parameters:
trans
- the transaction objectmem
- the memento containing the state of the entry to be saved- Throws:
- CreateException - failed to save the object
to the database
- Overrides:
- create in class PersistenceSupport
getJoin
public JDBCJoin getJoin(java.lang.String tbl)
- No joins currently supported.
- Parameters:
tbl
- not used- Returns:
- null
- Overrides:
- getJoin in class JDBCSupport
getPrimaryTable
public java.lang.String getPrimaryTable()
- Returns:
- "ENTRY"
- Overrides:
- getPrimaryTable in class JDBCSupport
load
public void load(Transaction trans,
Memento mem)
throws LoadException
- This method is left empty since the
Entry
class
is not currently used as a concrete class.
- Parameters:
trans
- unusedmem
- unused- Throws:
- LoadException - always thrown
- Overrides:
- load in class PersistenceSupport
mapField
protected java.lang.String mapField(java.lang.String fld)
throws FindException
- Maps the fields used in a search to actual database fields.
- Parameters:
fld
- the search field- Returns:
- the database column
- Throws:
- FindException - the desired field does not
exist
- Overrides:
- mapField in class JDBCSupport
remove
public void remove(Transaction trans,
Memento mem)
throws RemoveException
- Deletes the entry represented by the data in the specified memento
from the database.
- Parameters:
trans
- the transaction objectmem
- the memento containing the entry state- Throws:
- RemoveException - an error occurred deleting
the object from the data store
- Overrides:
- remove in class PersistenceSupport
store
public void store(Transaction trans,
Memento mem)
throws StoreException
- Stores the entry whose state is contained in the specified
memento into the database.
- Parameters:
trans
- the transaction objectmem
- the memento containing the entry's state- Throws:
- StoreException - an error occurred
storing the entry
- Overrides:
- store in class PersistenceSupport