com.mysema.query.sql
Class Configuration

java.lang.Object
  extended by com.mysema.query.sql.Configuration

public class Configuration
extends Object

Configuration for SQLQuery instances

Author:
tiwe

Field Summary
static Configuration DEFAULT
           
 
Constructor Summary
Configuration(SQLTemplates templates)
           
 
Method Summary
<T> T
get(ResultSet rs, Path<?> path, int i, Class<T> clazz)
           
 Class<?> getJavaType(int sqlType, String tableName, String columnName)
          Get the java type for the given jdbc type, table name and column name
 SQLTemplates getTemplates()
           
 void register(Type<?> type)
          Register the given Type
<T> int
set(PreparedStatement stmt, Path<?> path, int i, T value)
           
 void setType(int jdbcType, Class<?> javaType)
          Set the java type for the given JDBC type
 void setType(String table, String column, Type<?> type)
          Set the java type for the given table and column
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final Configuration DEFAULT
Constructor Detail

Configuration

public Configuration(SQLTemplates templates)
Method Detail

getTemplates

public SQLTemplates getTemplates()

getJavaType

public Class<?> getJavaType(int sqlType,
                            String tableName,
                            String columnName)
Get the java type for the given jdbc type, table name and column name

Parameters:
sqlType -
tableName -
columnName -
Returns:

get

@Nullable
public <T> T get(ResultSet rs,
                          @Nullable
                          Path<?> path,
                          int i,
                          Class<T> clazz)
      throws SQLException
Type Parameters:
T -
Parameters:
rs -
path -
i -
clazz -
Returns:
Throws:
SQLException

set

public <T> int set(PreparedStatement stmt,
                   Path<?> path,
                   int i,
                   T value)
        throws SQLException
Type Parameters:
T -
Parameters:
stmt -
path -
i -
value -
Returns:
Throws:
SQLException

register

public void register(Type<?> type)
Register the given Type

Parameters:
type -

setType

public void setType(int jdbcType,
                    Class<?> javaType)
Set the java type for the given JDBC type

Parameters:
jdbcType -
javaType -

setType

public void setType(String table,
                    String column,
                    Type<?> type)
Set the java type for the given table and column

Parameters:
table -
column -
type -


Copyright © 2007-2010 Mysema Ltd. All Rights Reserved.