com.nonesole.persistence.sql
Class PreparedStatementDML

java.lang.Object
  extended by com.nonesole.persistence.sql.PreparedStatementDML

public class PreparedStatementDML
extends java.lang.Object

Deal with object by prepared sql.

Version:
1.0 - build in 2009-07-29
Author:
JACK LEE

Method Summary
 java.sql.Connection getInsertConnection(java.sql.Connection conn, java.lang.Object obj)
          Get connection which contains insert sql
 java.sql.Connection getInsertConnection(java.sql.Connection conn, java.lang.Object obj, java.lang.reflect.Field[] fields)
          Get connection which contains insert sql
static PreparedStatementDML getInstance()
          Get PreparedStatementDML object
 java.sql.Connection getUpdateConnection(java.sql.Connection conn, java.lang.Object obj)
          Get connection which contains update sql
 java.sql.Connection getUpdateConnection(java.sql.Connection conn, java.lang.Object obj, java.lang.reflect.Field[] fields)
          Get connection which contains update sql
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static PreparedStatementDML getInstance()
Get PreparedStatementDML object

Returns:
PreparedStatementDML

getInsertConnection

public java.sql.Connection getInsertConnection(java.sql.Connection conn,
                                               java.lang.Object obj)
                                        throws OperationsException
Get connection which contains insert sql

Parameters:
conn - Connection Object
obj - object needs insert
Returns:
connection which contains insert sql
Throws:
OperationsException

getUpdateConnection

public java.sql.Connection getUpdateConnection(java.sql.Connection conn,
                                               java.lang.Object obj)
                                        throws OperationsException
Get connection which contains update sql

Parameters:
conn - Connection Object
obj - object needs update
Returns:
connection which contains update sql
Throws:
OperationsException

getInsertConnection

public java.sql.Connection getInsertConnection(java.sql.Connection conn,
                                               java.lang.Object obj,
                                               java.lang.reflect.Field[] fields)
                                        throws OperationsException
Get connection which contains insert sql

Parameters:
conn - Connection Object
obj - object needs insert
fields - fields needs insert
Returns:
connection which contains insert sql
Throws:
OperationsException

getUpdateConnection

public java.sql.Connection getUpdateConnection(java.sql.Connection conn,
                                               java.lang.Object obj,
                                               java.lang.reflect.Field[] fields)
                                        throws OperationsException
Get connection which contains update sql

Parameters:
conn - Connection Object
obj - object needs update
fields - fields needs update
Returns:
connection which contains update sql
Throws:
OperationsException