|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.skife.jdbi.v2.sqlobject.SqlObjectBuilder
public class SqlObjectBuilder
This duplicates the API on DBI and Handle for creating sql objects. While it is fine to use these
methods to create sql objects, there is no real difference between them and the oones on DBI and Handle.
| Constructor Summary | |
|---|---|
SqlObjectBuilder()
|
|
| Method Summary | ||
|---|---|---|
static
|
attach(Handle handle,
Class<T> sqlObjectType)
Create a a sql object of the specified type bound to this handle. |
|
static void |
close(Object sqlObject)
Used to close a sql object which lacks a close() method. |
|
static
|
onDemand(DBI dbi,
Class<T> sqlObjectType)
Create a new sql object which will obtain and release connections from this dbi instance, as it needs to, and can, respectively. |
|
static
|
open(DBI dbi,
Class<T> sqlObjectType)
Open a handle and attach a new sql object of the specified type to that handle. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SqlObjectBuilder()
| Method Detail |
|---|
public static <T> T attach(Handle handle,
Class<T> sqlObjectType)
handle - the Handle instance to attach ths sql object tosqlObjectType - the type of sql object to create
public static void close(Object sqlObject)
sqlObject - the sql object to close
public static <T> T onDemand(DBI dbi,
Class<T> sqlObjectType)
dbi - the DBI instance to be used for obtaining connections when they are requiredsqlObjectType - an interface with annotations declaring desired behavior
public static <T> T open(DBI dbi,
Class<T> sqlObjectType)
IDBI.close(Object)
dbi - the dbi to be used for opening the underlying handlesqlObjectType - an interface with annotations declaring desired behavior
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||