public class Bundler extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Bundler.Transaction |
| Constructor and Description |
|---|
Bundler() |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertConnected() |
static void |
dumpDB(DataSource ds,
PrintWriter writer,
Character identifierQuote)
Helper method that dumps all the tables in the database, including the
Java types that should be used in mapping.
|
static <T> T |
inflate(Class<T> type)
"Inflates" the given type with the given
DataSource. |
static <T> T |
inflate(Class<T> type,
InputStream is) |
static <T> T |
inflate(Class<T> type,
InputStream is,
String dialect) |
static <T> T |
inflate(Class<T> type,
Reader reader) |
static <T> T |
inflate(Class<T> type,
Reader reader,
String dialect) |
static <T> T |
inflate(Class<T> type,
String dialect)
"Inflates" the given type with the given
DataSource. |
static Bundler.Transaction |
inheritReadTransaction(DataSource ds) |
static Bundler.Transaction |
inheritWriteTransaction(DataSource ds) |
static Bundler.Transaction |
readTransaction(DataSource ds) |
static void |
registerPrimitiveType(Class<?> type)
Allows to register types, beside JRE primitive types, to be treated as
primitive types instead of java beans.
|
static void |
validate(Object o)
Validates an already inflated object's bindings.
|
static Bundler.Transaction |
writeTransaction(DataSource ds) |
public static void registerPrimitiveType(Class<?> type)
public static <T> T inflate(Class<T> type) throws IOException
DataSource.
Where inflate means creating a Proxy with the capability of
mapping methods to queries.
Since the name of the file to load is not provided, the file is searched
in the classpath with the name of the class followed by the
"-bundler.xml" extension instead of the ".class"
extension.
This method is the same than invoking
inflate(Class, Reader, String), but taking the reader from the
classpath and with null dialect.
IOExceptioninflate(Class, Reader, String)public static <T> T inflate(Class<T> type, String dialect) throws IOException
DataSource.
Where inflate means creating a Proxy with the capability of
mapping methods to queries.
Since the name of the file to load is not provided, the file is searched
in the classpath with the name of the class followed by the
"-bundler.xml" extension instead of the ".class"
extension.
This method allows to specify a "dialect" string to filter queries from the queries file.
IOExceptionpublic static <T> T inflate(Class<T> type, InputStream is) throws IOException
IOExceptionpublic static <T> T inflate(Class<T> type, InputStream is, String dialect) throws IOException
IOExceptionpublic static <T> T inflate(Class<T> type, Reader reader) throws IOException
IOExceptionpublic static <T> T inflate(Class<T> type, Reader reader, String dialect) throws IOException
IOExceptionpublic static void validate(Object o)
IllegalArgumentException - if the provided object is not a valid inflated object.BundlerValidationException - if there is an inconsistency between methods and queries.public static Bundler.Transaction readTransaction(DataSource ds)
public static Bundler.Transaction inheritReadTransaction(DataSource ds)
public static Bundler.Transaction writeTransaction(DataSource ds)
public static Bundler.Transaction inheritWriteTransaction(DataSource ds)
public static void assertConnected()
public static void dumpDB(DataSource ds, PrintWriter writer, Character identifierQuote)
Copyright © 2014. All Rights Reserved.