public class DefaultBasicPreparedAction extends java.lang.Object implements IBasicAction
限定符和类型 | 字段和说明 |
---|---|
private static DefaultBasicPreparedAction |
action |
private Logger |
logger |
限定符 | 构造器和说明 |
---|---|
private |
DefaultBasicPreparedAction() |
限定符和类型 | 方法和说明 |
---|---|
static void |
execute(java.sql.PreparedStatement st)
Execute sql
|
void |
executeAction(Action action,
java.sql.Connection conn,
boolean partOfTransaction,
InputTransform inputTransform)
According to the rules in Action object which is loaded from xml file,
this method would call InputTransform object to assemble SQLs, and execute SQLs by itself. |
static void |
executeSave(java.sql.PreparedStatement st,
java.lang.Object obj)
Execute sql
|
static DefaultBasicPreparedAction |
getInstance() |
static OSMObject |
getOSM(java.lang.Object obj)
锟接伙拷锟斤拷锟斤拷取锟斤拷指锟斤拷Object锟斤拷应锟斤拷ORM锟斤拷锟斤拷
|
static java.sql.PreparedStatement |
getPreparedStatement(java.sql.Connection conn,
java.lang.String sql)
Get prepared statement by conn and sql
|
static java.lang.String |
getQuerySQLWithPrimeryKey(java.lang.Object obj)
Get query sql whose id as condition.
|
static java.sql.ResultSet |
query(java.sql.PreparedStatement st)
Execute sql
|
void |
queryAction(Action action,
java.sql.Connection conn,
InputTransform inputTransform,
OutputTransform<?> outTransform)
According to the rules in Action object which is loaded from xml file,
this method would call OutputTransform object to assemble SQLs, and execute SQLs by itself. |
static void |
saveBlob(java.sql.Connection conn,
java.lang.Object obj,
java.util.Vector<java.lang.Integer> blobPosition,
java.util.Vector<java.lang.Object> v)
Deal with blob field
|
static void |
setBlob(java.sql.PreparedStatement st,
java.util.List<java.lang.Integer> blobPosition,
int fieldPosition)
Deal with blob value
|
static void |
setValues(java.sql.PreparedStatement st,
java.util.List<java.lang.Object> values,
java.util.List<java.lang.Class<?>> fTypes,
java.util.List<java.lang.Integer> blobPosition,
int startPosition)
Set values to prepared statement to finish integral sql.
|
private Logger logger
private static final DefaultBasicPreparedAction action
public static DefaultBasicPreparedAction getInstance()
public void executeAction(Action action, java.sql.Connection conn, boolean partOfTransaction, InputTransform inputTransform) throws java.lang.Exception
IBasicAction
executeAction
在接口中 IBasicAction
java.lang.Exception
public void queryAction(Action action, java.sql.Connection conn, InputTransform inputTransform, OutputTransform<?> outTransform) throws java.lang.Exception
IBasicAction
queryAction
在接口中 IBasicAction
java.lang.Exception
public static void setValues(java.sql.PreparedStatement st, java.util.List<java.lang.Object> values, java.util.List<java.lang.Class<?>> fTypes, java.util.List<java.lang.Integer> blobPosition, int startPosition) throws ExecuteSQLException
st
- PreparedStatement which has prepared sqlvalues
- to '?' in sqltype
- of valuesblob's
- position in valuesstartPosition
- start position of valuesExecuteSQLException
public static void setBlob(java.sql.PreparedStatement st, java.util.List<java.lang.Integer> blobPosition, int fieldPosition) throws ExecuteSQLException
st
- PreparedStatement objectblob's
- position in valuesfieldPosition
- field position in fieldsExecuteSQLException
public static void saveBlob(java.sql.Connection conn, java.lang.Object obj, java.util.Vector<java.lang.Integer> blobPosition, java.util.Vector<java.lang.Object> v) throws ExecuteSQLException, java.lang.NoSuchMethodException, java.lang.SecurityException, java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException
conn
- Connection Objectobj
- Object needs saveblobPosition
- blob's position in fieldsv
- list of valuesjava.lang.reflect.InvocationTargetException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.SecurityException
java.lang.NoSuchMethodException
ExecuteSQLException
public static java.lang.String getQuerySQLWithPrimeryKey(java.lang.Object obj) throws ExecuteSQLException, java.lang.NoSuchMethodException, java.lang.SecurityException, java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException
conn
- Connection Objectobj
- object for queryjava.lang.reflect.InvocationTargetException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.SecurityException
java.lang.NoSuchMethodException
ExecuteSQLException
public static OSMObject getOSM(java.lang.Object obj) throws ExecuteSQLException
obj
- ExecuteSQLException
public static java.sql.PreparedStatement getPreparedStatement(java.sql.Connection conn, java.lang.String sql) throws ExecuteSQLException
conn
- ConnectionExecuteSQLException
public static void execute(java.sql.PreparedStatement st) throws ExecuteSQLException
st
- PreparedStatement ObjectExecuteSQLException
public static void executeSave(java.sql.PreparedStatement st, java.lang.Object obj) throws ExecuteSQLException
st
- PreparedStatement ObjectExecuteSQLException
public static java.sql.ResultSet query(java.sql.PreparedStatement st) throws ExecuteSQLException
st
- PreparedStatement ObjectExecuteSQLException