public class RootsDaoJdbc extends java.lang.Object implements RootsDao
Roots.| Modifier and Type | Class and Description |
|---|---|
protected class |
RootsDaoJdbc.RootDelete
Root Delete Object. |
protected class |
RootsDaoJdbc.RootInsert
Root Insert Object. |
protected class |
RootsDaoJdbc.RootUpdate
Root Update Object. |
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
logger |
| Constructor and Description |
|---|
RootsDaoJdbc() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRoot(Root r)
Add this
Root to the database. |
void |
deleteRoot(Root r)
Delete this
Root from the database. |
java.util.List<Root> |
getActiveRoots()
Get a List of
Roots that the user has NOT marked as inactive. |
java.util.List<Root> |
getInactiveRoots()
Get a List of
Roots that the user has marked as inactive. |
Root |
getRoot(int rid)
Fetch the
Root that matches this Root ID. |
Root |
getRoot(java.lang.String name)
Get the
Root that matches this name. |
int |
getRootCount()
Fetch the number of Roots in the database.
|
java.util.List<Root> |
getRoots()
Fetch a List of all
Roots in the database. |
void |
setDataSource(javax.sql.DataSource ds)
Set the reference to the JDBC datasource.
|
void |
setRoots(java.util.List<Root> roots)
Set the
Roots in the database to be this list. |
void |
storeRoot(Root root)
Update an existing root in the database.
|
public void setDataSource(javax.sql.DataSource ds)
ds - The datasource as configured by Spring.public java.util.List<Root> getRoots() throws DataAccessException
RootsDaoRoots in the database.public java.util.List<Root> getInactiveRoots() throws DataAccessException
RootsDaoRoots that the user has marked as inactive.getInactiveRoots in interface RootsDaoRoots.DataAccessException - Sorry.public java.util.List<Root> getActiveRoots() throws DataAccessException
RootsDaoRoots that the user has NOT marked as inactive.getActiveRoots in interface RootsDaoRoots.DataAccessException - no joy.public int getRootCount()
throws DataAccessException
RootsDaogetRootCount in interface RootsDaoDataAccessException - It broke.public Root getRoot(int rid) throws DataAccessException
RootsDaoRoot that matches this Root ID.public Root getRoot(java.lang.String name) throws DataAccessException
RootsDaoRoot that matches this name.public void storeRoot(Root root) throws DataAccessException
RootsDaopublic void setRoots(java.util.List<Root> roots) throws DataAccessException
RootsDaoRoots in the database to be this list. public void addRoot(Root r) throws DataAccessException
RootsDaoRoot to the database.public void deleteRoot(Root r) throws DataAccessException
RootsDaoRoot from the database.deleteRoot in interface RootsDaor - The Root to delete.DataAccessException - died.