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