|
Copyright 2008 - 2010 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg This software is released under an open source BSD licence. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfj.control.db.DbState
public final class DbState
Performs database I/O, in order to read or write the database state.
| Method Summary | ||
|---|---|---|
static Connector |
driverManager(String url)
A simple connector (the default) that gets connections to the given database URL from the driver manager. |
|
static DbState |
reader(Connector pc)
Returns a new reader that reads the database via the given Connector. |
|
static DbState |
reader(String url)
Creates a database state reader given a connection URL. |
|
|
run(DB<A> dba)
Runs the given database action as a single transaction. |
|
static DbState |
writer(Connector pc)
Returns a new writer that writes the database via the given Connector. |
|
static DbState |
writer(String url)
Creates a database state writer given a connection URL. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Connector driverManager(String url)
url - The database URL to connect to.
public static DbState reader(String url)
url - The connection URL to the database.
public static DbState writer(String url)
url - The connection URL to the database.
public static DbState reader(Connector pc)
pc - A connector with which to generate database connections.
public static DbState writer(Connector pc)
pc - A connector with which to generate database connections.
public <A> A run(DB<A> dba)
throws SQLException
dba - A database action to run.
SQLException - in case of a database error.
|
Copyright 2008 - 2010 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg This software is released under an open source BSD licence. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||