public class WCPDBConnection
extends DBConnection
Modifier and Type | Field and Description |
---|---|
static int |
WCP_E_ACCESS_DENIED |
static int |
WCP_E_CONNECTION_FAILED |
static int |
WCP_E_TUPLE_CHANGED |
static int |
WCP_E_UNKNOWN_ERROR |
Constructor and Description |
---|
WCPDBConnection(int dso)
Deprecated.
Use the connection pool
com.eibus.applicationconnector.sql.DBConnectionPool instead of constructing independent connections yourself. |
Modifier and Type | Method and Description |
---|---|
int |
abortCurrentTransaction()
Aborts the current update transaction
|
int |
commitCurrentTransaction()
Commits the current update transaction
|
int |
createAuditTable(int node)
Method to create a audit-table for a given table.
|
int |
executeDDL(int metadata)
Method to execute any SQL DDL command against the backend data source
This DDL execution is autocommit in nature, ie., any DDL execution can't be rolled back. |
int |
executeDML(int commandNode)
Method to execute any SQL DML command against the backend data source
This will normally be inside a transaction. |
java.lang.String |
getConditionString(int node) |
int |
getErrorCode()
Gets the current error code.
|
IStringResource |
getErrorMessage()
Returns localized error message.
|
IStringResource |
getErrorMessage(int xqyErrorNode)
Returns localized error message.
|
int |
getMetaData(int metadata,
AccessControlObject accessControlObject)
Method to retrieve metadata from backend data source
|
boolean |
getNullPrecedence()
Sets or unsets priority for null="true" over data if both are peresent in a node
|
int |
purgeAuditTable(int node)
Method to purge a audit-table.
|
int |
query(int constructor,
AccessControlObject accessControlObject)
Method to read data from backend data source
|
void |
resetConnectionCache()
resetConnectionCache will clear the PreparedStatement/resultset/metadata Cache on Current Connection Object this api should not be used
when connection is processing some request it can be used when you just got a connection from connection pool or before putting back the connection
into connection pool.
|
protected void |
setConnectionId(int connectionId) |
void |
setExtendeddbConnectionProperties(IConnectionCustomizer connectionCustomizer)
Set extended connection properties on this connection
|
void |
setNullPrecedence(boolean priority)
Sets or unsets priority for null="true" over data if both are peresent in a node
|
java.lang.String |
toString() |
void |
unSetExtendeddbConnectionProperties()
Unset extended connection properties
|
int |
update(int update,
AccessControlObject accessControlObject)
Method to update data in backend data source
|
int |
validateCommand(int validate)
Method to validate an SQL query against the backend data source
It returns the metadata information of the resultset returned by the query |
public static int WCP_E_CONNECTION_FAILED
public static int WCP_E_ACCESS_DENIED
public static int WCP_E_TUPLE_CHANGED
public static int WCP_E_UNKNOWN_ERROR
public WCPDBConnection(int dso)
com.eibus.applicationconnector.sql.DBConnectionPool
instead of constructing independent connections yourself.dso
- A pointer to a native XML tree containing configuration information for the Database Connection
public int query(int constructor, AccessControlObject accessControlObject)
constructor
- A pointer to a native XML tree containing SQL query information in Cordys Integrator protocol formataccessControlObject
- The user access control information which can be obtained using 'getAccessControlObject' method of 'com.eibus.security.ac.Registration' classpublic int update(int update, AccessControlObject accessControlObject)
update
- A pointer to a native XML tree containing SQL update query information in Cordys Integrator protocol formataccessControlObject
- The user access control information which can be obtained using 'getAccessControlObject' method of 'com.eibus.security.ac.Registration' classpublic int getMetaData(int metadata, AccessControlObject accessControlObject)
metadata
- A pointer to a native XML tree containing SQL query information in Cordys Integrator protocol formataccessControlObject
- The user access control information which can be obtained using 'getAccessControlObject' method of 'com.eibus.security.ac.Registration' classpublic int validateCommand(int validate)
validate
- A pointer to a native XML tree containing SQL query information in Cordys Integrator protocol formataccessControlObject
- The user access control information which can be obtained using 'getAccessControlObject' method of 'com.eibus.security.ac.Registration' classpublic int executeDDL(int metadata)
metadata
- A pointer to a native XML tree containing SQL DDL command in Cordys Integrator protocol formatpublic int executeDML(int commandNode)
commandNode
- A native xml node representing the dml request in the expected formatpublic int commitCurrentTransaction()
public int abortCurrentTransaction()
public int createAuditTable(int node)
node
- A pointer to a native XML tree containing table-node and an auditTable-nodepublic int purgeAuditTable(int node)
node
- A pointer to a native XML tree containing auditTable-nodepublic void setNullPrecedence(boolean priority)
priority
- - boolean value denoting the priority for null="true"public void setExtendeddbConnectionProperties(IConnectionCustomizer connectionCustomizer)
:
- connectionCustomizer - an instance of implementation of com.cordys.xqy.connection.IConnectionCustomizerpublic void unSetExtendeddbConnectionProperties()
public boolean getNullPrecedence()
public int getErrorCode()
public java.lang.String getConditionString(int node)
protected void setConnectionId(int connectionId)
public java.lang.String toString()
public IStringResource getErrorMessage()
public IStringResource getErrorMessage(int xqyErrorNode)
The
- request xml node which caused error.public void resetConnectionCache()