public class BySqlStatic extends Object
Modifier and Type | Method and Description |
---|---|
static void |
attachParams(PreparedStatement statement,
Object params)
Deprecated.
doesnt work with postgres, pass in types explicitly
|
static void |
attachParams(PreparedStatement statement,
Object params,
Object types)
Attach params for a prepared statement.
|
static List<org.hibernate.type.Type> |
convertParamsToTypes(Object params)
Deprecated.
doesnt work with postgres. pass in types explicitly
|
int |
executeSql(String sql)
execute some sql
|
int |
executeSql(String sql,
List<Object> params)
Deprecated.
doesnt work with postgres, need to pass in param types explicitly since cant determine them if null
|
int |
executeSql(String sql,
List<Object> params,
List<org.hibernate.type.Type> types)
execute some sql
|
<T> List<T> |
listSelect(Class<T> returnClassType,
String sql,
List<Object> params)
Deprecated.
doesnt work with postgres, need to pass in param types explicitly since cant determine them if null
|
<T> List<T> |
listSelect(Class<T> returnClassType,
String sql,
List<Object> params,
List<org.hibernate.type.Type> types)
select one object from sql (one row, one col
|
<T> List<T> |
listSelectHiberateMapped(Class<T> returnClassType,
String query,
List<Object> params)
Deprecated.
doesnt work with postgres, need to pass in param types explicitly since cant determine them if null
|
<T> List<T> |
listSelectHiberateMapped(Class<T> returnClassType,
String query,
List<Object> params,
List<org.hibernate.type.Type> types)
select one object from sql (one row, one col
|
<T> T |
select(Class<T> returnClassType,
String sql)
select one object from sql (one row, one col
|
<T> T |
select(Class<T> returnClassType,
String sql,
List<Object> params)
Deprecated.
doesnt work with postgres, need to pass in param types explicitly since cant determine them if null
|
<T> T |
select(Class<T> returnClassType,
String sql,
List<Object> params,
List<org.hibernate.type.Type> types)
select one object from sql (one row, one col
|
public int executeSql(String sql)
sql
- can be insert, update, delete, or ddl@Deprecated public int executeSql(String sql, List<Object> params)
sql
- can be insert, update, delete, or ddlparams
- prepared statement paramspublic int executeSql(String sql, List<Object> params, List<org.hibernate.type.Type> types)
sql
- can be insert, update, delete, or ddlparams
- prepared statement paramstypes
- is the types of the paramspublic <T> T select(Class<T> returnClassType, String sql)
T
- the typereturnClassType
- type to be returned (currnetly supports string and intsql
- can be insert, update, delete, or ddl@Deprecated public <T> T select(Class<T> returnClassType, String sql, List<Object> params)
T
- the typereturnClassType
- type to be returned (currnetly supports string and intsql
- can be insert, update, delete, or ddlparams
- prepared statement paramspublic <T> T select(Class<T> returnClassType, String sql, List<Object> params, List<org.hibernate.type.Type> types)
T
- the typereturnClassType
- type to be returned (currnetly supports string and intsql
- can be insert, update, delete, or ddlparams
- prepared statement paramstypes
- types of paramspublic <T> List<T> listSelectHiberateMapped(Class<T> returnClassType, String query, List<Object> params)
T
- the typereturnClassType
- type to be returned (currnetly supports string and intquery
- can be insert, update, delete, or ddlparams
- prepared statement paramspublic <T> List<T> listSelectHiberateMapped(Class<T> returnClassType, String query, List<Object> params, List<org.hibernate.type.Type> types)
T
- the typereturnClassType
- type to be returned (currnetly supports string and intquery
- can be insert, update, delete, or ddlparams
- prepared statement paramstypes
- types of params@Deprecated public <T> List<T> listSelect(Class<T> returnClassType, String sql, List<Object> params)
T
- the typereturnClassType
- type to be returned (currnetly supports string and intsql
- can be insert, update, delete, or ddlparams
- prepared statement paramspublic <T> List<T> listSelect(Class<T> returnClassType, String sql, List<Object> params, List<org.hibernate.type.Type> types)
T
- the typereturnClassType
- type to be returned (currnetly supports string and intsql
- can be insert, update, delete, or ddlparams
- prepared statement paramstypes
- @Deprecated public static void attachParams(PreparedStatement statement, Object params) throws org.hibernate.HibernateException, SQLException
statement
- params
- either null, Object, Object[], or List of Objectsorg.hibernate.HibernateException
SQLException
@Deprecated public static List<org.hibernate.type.Type> convertParamsToTypes(Object params)
params
- public static void attachParams(PreparedStatement statement, Object params, Object types) throws org.hibernate.HibernateException, SQLException
statement
- params
- either null, Object, Object[], or List of Objectstypes
- either null, Type, Type[], or List of Objectsorg.hibernate.HibernateException
SQLException
Copyright © 2016 Internet2. All rights reserved.