Package org.compiere.db
Class ReadReplicaPreparedStatementProxy
- java.lang.Object
-
- org.compiere.db.ReadReplicaPreparedStatementProxy
-
- All Implemented Interfaces:
InvocationHandler
public class ReadReplicaPreparedStatementProxy extends Object implements InvocationHandler
Read replica proxy for prepared statement- Author:
- Low Heng Sin
-
-
Field Summary
Fields Modifier and Type Field Description protected CLogger
log
Loggerprotected PreparedStatement
p_stmt
Wrap prepared statementprotected CStatementVO
p_vo
Value Object
-
Constructor Summary
Constructors Constructor Description ReadReplicaPreparedStatementProxy(int resultSetType, int resultSetConcurrency, String sql)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getSql()
Get SqlObject
invoke(Object obj, Method method, Object[] args)
boolean
isValid()
-
-
-
Field Detail
-
log
protected transient CLogger log
Logger
-
p_stmt
protected transient PreparedStatement p_stmt
Wrap prepared statement
-
p_vo
protected CStatementVO p_vo
Value Object
-
-
Constructor Detail
-
ReadReplicaPreparedStatementProxy
public ReadReplicaPreparedStatementProxy(int resultSetType, int resultSetConcurrency, String sql)
- Parameters:
resultSetType
-resultSetConcurrency
-sql
-
-
-
Method Detail
-
invoke
public Object invoke(Object obj, Method method, Object[] args) throws Throwable
- Specified by:
invoke
in interfaceInvocationHandler
- Throws:
Throwable
-
getSql
public String getSql()
Get Sql- Returns:
- sql
-
isValid
public boolean isValid()
- Returns:
- true if the wrapped prepared statement is valid
-
-