public class RootsDaoJdbc extends java.lang.Object implements RootsDao
Root
s.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
Root s that the user has NOT marked as inactive. |
java.util.List<Root> |
getInactiveRoots()
Get a List of
Root s 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
Root s 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
Root s 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
RootsDao
Root
s in the database.public java.util.List<Root> getInactiveRoots() throws DataAccessException
RootsDao
Root
s that the user has marked as inactive.getInactiveRoots
in interface RootsDao
Root
s.DataAccessException
- Sorry.public java.util.List<Root> getActiveRoots() throws DataAccessException
RootsDao
Root
s that the user has NOT marked as inactive.getActiveRoots
in interface RootsDao
Root
s.DataAccessException
- no joy.public int getRootCount() throws DataAccessException
RootsDao
getRootCount
in interface RootsDao
DataAccessException
- It broke.public Root getRoot(int rid) throws DataAccessException
RootsDao
Root
that matches this Root ID.public Root getRoot(java.lang.String name) throws DataAccessException
RootsDao
Root
that matches this name.public void storeRoot(Root root) throws DataAccessException
RootsDao
public void setRoots(java.util.List<Root> roots) throws DataAccessException
RootsDao
Root
s in the database to be this list. public void addRoot(Root r) throws DataAccessException
RootsDao
Root
to the database.public void deleteRoot(Root r) throws DataAccessException
RootsDao
Root
from the database.deleteRoot
in interface RootsDao
r
- The Root
to delete.DataAccessException
- died.