|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectno.priv.garshol.duke.RDBMSLinkDatabase
public abstract class RDBMSLinkDatabase
An abstract SQL-based link database implementation which can can maintain a set of links in an H2 or Oracle database over JDBC. It could be extended to work with more database implementations. What the abstract class cannot do is create a connection, which is left for subclasses to do.
| Nested Class Summary | |
|---|---|
static class |
RDBMSLinkDatabase.DatabaseType
|
| Field Summary | |
|---|---|
protected Statement |
stmt
|
| Constructor Summary | |
|---|---|
RDBMSLinkDatabase(String dbtype)
|
|
| Method Summary | |
|---|---|
void |
assertLink(Link link)
Assert a link. |
void |
clear()
Empties the link database. |
void |
close()
Shuts down the database, releasing resources. |
void |
commit()
Commit asserted links to persistent store. |
List<Link> |
getAllLinks()
Get all links. |
Collection<Link> |
getAllLinksFor(String id)
Get all links for this identity. |
List<Link> |
getChangesSince(long since)
Returns all links modified since the given time. |
List<Link> |
getChangesSince(long since,
long before)
|
List<Link> |
getChangesSince(long since,
long before,
int pagesize)
|
Link |
inferLink(String id1,
String id2)
Can we work out, based on what we know, the relationship between these two? Returns null if we don't know the relationship. |
void |
init()
This method must be called to initialize the database. |
void |
setLogger(Logger logger)
|
void |
setTablePrefix(String tblprefix)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface no.priv.garshol.duke.LinkDatabase |
|---|
validateConnection |
| Field Detail |
|---|
protected Statement stmt
| Constructor Detail |
|---|
public RDBMSLinkDatabase(String dbtype)
| Method Detail |
|---|
public void init()
public void setLogger(Logger logger)
public void setTablePrefix(String tblprefix)
public List<Link> getAllLinks()
LinkDatabase
getAllLinks in interface LinkDatabasepublic List<Link> getChangesSince(long since)
LinkDatabase
getChangesSince in interface LinkDatabase
public List<Link> getChangesSince(long since,
long before)
public List<Link> getChangesSince(long since,
long before,
int pagesize)
public Collection<Link> getAllLinksFor(String id)
LinkDatabase
getAllLinksFor in interface LinkDatabasepublic void assertLink(Link link)
LinkDatabase
assertLink in interface LinkDatabase
public Link inferLink(String id1,
String id2)
LinkDatabase
inferLink in interface LinkDatabasepublic void clear()
clear in interface LinkDatabasepublic void commit()
LinkDatabase
commit in interface LinkDatabasepublic void close()
LinkDatabase
close in interface LinkDatabase
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||