|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.borg.model.db.jdbc.JdbcDB
net.sf.borg.model.db.jdbc.JdbcBeanDB<Link>
net.sf.borg.model.db.jdbc.LinkJdbcDB
public class LinkJdbcDB
provides the JDBC layer for reading/writing Links
| Field Summary |
|---|
| Fields inherited from class net.sf.borg.model.db.jdbc.JdbcDB |
|---|
connection_ |
| Constructor Summary | |
|---|---|
LinkJdbcDB()
|
|
| Method Summary | |
|---|---|
void |
addObj(Link att)
Adds a KeyedEntity to the database |
(package private) Link |
createFrom(ResultSet r)
Fills in an entity from a result set |
void |
delete(int key)
Delete a KeyedEntity from the database |
Collection<Integer> |
getKeys()
Gets the keys. |
Collection<Link> |
getLinks(int ownerkey,
String ownertype)
Gets all links for a given Entity. |
(package private) PreparedStatement |
getPSAll()
|
(package private) PreparedStatement |
getPSOne(int key)
|
Link |
newObj()
Return a new instance of the KeyedEntity |
int |
nextkey()
get the next available key value for this entity type |
void |
updateObj(Link att)
Update a KeyedEntity in the database |
| Methods inherited from class net.sf.borg.model.db.jdbc.JdbcBeanDB |
|---|
delCache, emptyCache, readAll, readCache, readObj, sync, writeCache |
| Methods inherited from class net.sf.borg.model.db.jdbc.JdbcDB |
|---|
beginTransaction, buildDbDir, checkTimestamp, close, commitTransaction, connect, execSQL, getConnection, getOption, getOptions, getUrl, rollbackTransaction, setOption, toInt, toInt, toStr, toVect |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.borg.model.db.EntityDB |
|---|
readAll, readObj, sync |
| Constructor Detail |
|---|
public LinkJdbcDB()
| Method Detail |
|---|
public void addObj(Link att)
throws Exception
EntityDB
addObj in interface EntityDB<Link>att - the KeyedEntity
Exception
public void delete(int key)
throws Exception
EntityDB
delete in interface EntityDB<Link>key - the key of the entity
Exception
public Collection<Integer> getKeys()
throws Exception
Exception - the exception
public int nextkey()
throws Exception
EntityDB
nextkey in interface EntityDB<Link>Exceptionpublic Link newObj()
EntityDB
newObj in interface EntityDB<Link>
PreparedStatement getPSOne(int key)
throws SQLException
getPSOne in class JdbcBeanDB<Link>SQLException
PreparedStatement getPSAll()
throws SQLException
getPSAll in class JdbcBeanDB<Link>SQLException
Link createFrom(ResultSet r)
throws SQLException
JdbcBeanDB
createFrom in class JdbcBeanDB<Link>r - the result set
SQLException
public void updateObj(Link att)
throws Exception
EntityDB
updateObj in interface EntityDB<Link>att - the KeyedEntity
Exception
public Collection<Link> getLinks(int ownerkey,
String ownertype)
throws SQLException
LinkDB
getLinks in interface LinkDBownerkey - the key of the Entityownertype - the type of Entity
SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||