com.ibm.xdms.function
Interface DatastorePut

All Superinterfaces:
Function

public interface DatastorePut
extends Function


Field Summary
static java.lang.String ATTR_REQUEST_PATCH_OPS
          Request attribute to store the Patch Operations Request Attribute
static java.lang.String ATTR_REQUEST_UPDATED_DOC
          Request attribute to store the updated document from a Node Selector PUT or DELETE
static java.lang.String ATTR_USER_TRANSACTION
          Request attribute to store the datastore's UserTransaction object
static java.lang.String PATCH_OPS_ADD
          Patch Operations Add Value
static java.lang.String PATCH_OPS_REMOVE
          Patch Operations Remove Value
static java.lang.String PATCH_OPS_REPLACE
          Path Operations Replace Value
 
Fields inherited from interface com.ibm.xdms.function.Function
COPYRIGHT
 
Method Summary
 java.lang.String getPwsInsertSql(java.lang.String table, java.lang.String documentString)
          Provides Insert SQL method that preserves whitespace.
 java.lang.String getPwsUpdateSql(java.lang.String table, java.lang.String documentString)
          Provides Update SQL method that preserves whitespace.
 boolean init(ApplicationUsage appUsage)
          Initializes the function.
 long insertNewDocument(XcapServerRequest request, XcapServerResponse response, javax.transaction.UserTransaction trans, java.sql.Connection con, java.lang.String documentSelector, java.lang.String table, java.lang.String primaryKeyIndexId)
           
 long updateNodeSelector(XcapServerRequest request, XcapServerResponse response, javax.transaction.UserTransaction trans, java.sql.Connection con, java.lang.String documentSelector, com.ibm.xcap.NodeSelector nodeSelector, java.lang.String table, ApplicationUsage appUsage, XcapCaps xcapCaps)
          Updates nodeSelector
 long updateWholeDocument(XcapServerRequest request, XcapServerResponse response, javax.transaction.UserTransaction trans, java.sql.Connection con, java.lang.String documentSelector, java.lang.String table)
          Updates whole document.
 
Methods inherited from interface com.ibm.xdms.function.Function
getApplicationUsage
 

Field Detail

ATTR_REQUEST_PATCH_OPS

static final java.lang.String ATTR_REQUEST_PATCH_OPS
Request attribute to store the Patch Operations Request Attribute

See Also:
Constant Field Values

PATCH_OPS_ADD

static final java.lang.String PATCH_OPS_ADD
Patch Operations Add Value

See Also:
Constant Field Values

PATCH_OPS_REMOVE

static final java.lang.String PATCH_OPS_REMOVE
Patch Operations Remove Value

See Also:
Constant Field Values

PATCH_OPS_REPLACE

static final java.lang.String PATCH_OPS_REPLACE
Path Operations Replace Value

See Also:
Constant Field Values

ATTR_REQUEST_UPDATED_DOC

static final java.lang.String ATTR_REQUEST_UPDATED_DOC
Request attribute to store the updated document from a Node Selector PUT or DELETE

See Also:
Constant Field Values

ATTR_USER_TRANSACTION

static final java.lang.String ATTR_USER_TRANSACTION
Request attribute to store the datastore's UserTransaction object

See Also:
Constant Field Values
Method Detail

init

boolean init(ApplicationUsage appUsage)
Description copied from interface: Function
Initializes the function.

Specified by:
init in interface Function
Parameters:
appUsage - The ApplicationUsage information.
Returns:
Returns true if the function successfully initialized.

updateWholeDocument

long updateWholeDocument(XcapServerRequest request,
                         XcapServerResponse response,
                         javax.transaction.UserTransaction trans,
                         java.sql.Connection con,
                         java.lang.String documentSelector,
                         java.lang.String table)
                         throws java.sql.SQLException,
                                XcapException,
                                UniquenessFailureException
Updates whole document. Checks for PreserveWhitespace

Parameters:
request -
response -
trans -
con -
ps -
rs -
documentSelector -
table -
Returns:
Throws:
java.sql.SQLException
XcapException
UniquenessFailureException

updateNodeSelector

long updateNodeSelector(XcapServerRequest request,
                        XcapServerResponse response,
                        javax.transaction.UserTransaction trans,
                        java.sql.Connection con,
                        java.lang.String documentSelector,
                        com.ibm.xcap.NodeSelector nodeSelector,
                        java.lang.String table,
                        ApplicationUsage appUsage,
                        XcapCaps xcapCaps)
                        throws java.sql.SQLException,
                               XcapException,
                               java.net.MalformedURLException
Updates nodeSelector

Parameters:
request -
response -
trans -
con -
ps -
rs -
documentSelector -
nodeSelector -
table -
xcapCaps -
Returns:
Throws:
java.sql.SQLException
XcapException
java.net.MalformedURLException

insertNewDocument

long insertNewDocument(XcapServerRequest request,
                       XcapServerResponse response,
                       javax.transaction.UserTransaction trans,
                       java.sql.Connection con,
                       java.lang.String documentSelector,
                       java.lang.String table,
                       java.lang.String primaryKeyIndexId)
                       throws java.sql.SQLException,
                              XcapException
Parameters:
request -
response -
trans -
con -
ps -
rs -
documentSelector -
table -
Returns:
Throws:
java.sql.SQLException
XcapException

getPwsInsertSql

java.lang.String getPwsInsertSql(java.lang.String table,
                                 java.lang.String documentString)
Provides Insert SQL method that preserves whitespace. IMPORTANT: This method needs to be overwritten in database specific PutImpl

Parameters:
table -
documentString -
Returns:

getPwsUpdateSql

java.lang.String getPwsUpdateSql(java.lang.String table,
                                 java.lang.String documentString)
Provides Update SQL method that preserves whitespace. IMPORTANT: This method needs to be overwritten in database specific PutImpl

Parameters:
table -
documentString -
Returns: