public class ChainsDaoJdbc extends java.lang.Object implements ChainsDao
Chain
s.Chain
,
ChainsDaoJdbc.javaModifier and Type | Class and Description |
---|---|
protected class |
ChainsDaoJdbc.ChainDelete
Chain Delete Object. |
protected class |
ChainsDaoJdbc.ChainInsert
Chain Insert Object. |
protected class |
ChainsDaoJdbc.ChainSetSizesDelete
Chain.SetSizes Delete Object. |
protected class |
ChainsDaoJdbc.ChainSetSizesInsert
Chain.SetSizes Insert Object. |
protected class |
ChainsDaoJdbc.ChainUpdate
Chain Update Object. |
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
logger |
Constructor and Description |
---|
ChainsDaoJdbc() |
Modifier and Type | Method and Description |
---|---|
void |
deleteChain(Chain chain)
Delete this
Chain from the Database. |
Chain |
getChain(int cid)
Fetch a
Chain based on its Chain ID. |
Chain |
getChain(java.lang.String name)
Fetch a
Chain based on its name. |
int |
getChainCount()
Return the number of Chains in the Database.
|
java.util.List<Chain> |
getChains()
Get a List of all of the Chains in the Database.
|
void |
setDataSource(javax.sql.DataSource ds)
Set the database reference
|
void |
storeChain(Chain chain)
Store this
Chain in the Database. |
public void setDataSource(javax.sql.DataSource ds)
ds
- The DataSource as generated by the Spring config/setup.public java.util.List<Chain> getChains() throws DataAccessException
ChainsDao
public Chain getChain(java.lang.String name) throws DataAccessException
ChainsDao
Chain
based on its name.public Chain getChain(int cid) throws DataAccessException
ChainsDao
Chain
based on its Chain ID.public void storeChain(Chain chain) throws DataAccessException
ChainsDao
Chain
in the Database.storeChain
in interface ChainsDao
chain
- The Chain to write.DataAccessException
- I don't think so.public void deleteChain(Chain chain) throws DataAccessException
ChainsDao
Chain
from the Database.deleteChain
in interface ChainsDao
chain
- The Chain to delete.DataAccessException
- Not happening today.public int getChainCount()
ChainsDao
getChainCount
in interface ChainsDao