public final class Configuration extends Object
Modifier and Type | Field and Description |
---|---|
static Configuration |
DEFAULT
Default instance
|
Constructor and Description |
---|
Configuration(SQLTemplates templates)
Create a new Configuration instance
|
Modifier and Type | Method and Description |
---|---|
<T> T |
get(ResultSet rs,
Path<?> path,
int i,
Class<T> clazz) |
Class<?> |
getJavaType(int sqlType,
int size,
int digits,
String tableName,
String columnName)
Get the java type for the given jdbc type, table name and column name
|
String |
getSchema(String schema)
Get schema override or schema
|
String |
getTable(String schema,
String table)
Get table override or table
|
SQLTemplates |
getTemplates() |
void |
register(String table,
String column,
Type<?> type)
Register the given Type for the given table and column
|
void |
register(Type<?> type)
Register the given Type to be used
|
void |
registerNumeric(int size,
int digits,
Class<?> javaType)
Override the binding for the given NUMERIC type
|
String |
registerSchemaOverride(String oldSchema,
String newSchema)
Register a schema override
|
String |
registerTableOverride(String oldTable,
String newTable)
Register a table override
|
String |
registerTableOverride(String schema,
String oldTable,
String newTable)
Register a schema specific table override
|
<T> void |
set(PreparedStatement stmt,
Path<?> path,
int i,
T value) |
public static final Configuration DEFAULT
public Configuration(SQLTemplates templates)
templates
- public SQLTemplates getTemplates()
public Class<?> getJavaType(int sqlType, int size, int digits, String tableName, String columnName)
sqlType
- size
- digits
- tableName
- columnName
- @Nullable public <T> T get(ResultSet rs, @Nullable Path<?> path, int i, Class<T> clazz) throws SQLException
T
- rs
- path
- i
- clazz
- SQLException
public String getSchema(String schema)
schema
- public String getTable(String schema, String table)
schema
- table
- public <T> void set(PreparedStatement stmt, Path<?> path, int i, T value) throws SQLException
T
- stmt
- path
- i
- value
- SQLException
public String registerSchemaOverride(String oldSchema, String newSchema)
oldSchema
- newSchema
- public String registerTableOverride(String oldTable, String newTable)
oldTable
- newTable
- public String registerTableOverride(String schema, String oldTable, String newTable)
schema
- oldTable
- newTable
- public void register(Type<?> type)
type
- public void registerNumeric(int size, int digits, Class<?> javaType)
size
- digits
- javaType
- Copyright © 2007-2013 Mysema Ltd. All Rights Reserved.