public class TXMLObjectAccessorImpl extends TAbstractAccessor implements TXMLObjectAccessor
canBeCancelled, clientRequests, requestCounter, SGUAI
Constructor and Description |
---|
TXMLObjectAccessorImpl(TStreamAccessor streamAccessor,
TResponseBuilder responseBuilder)
Special Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
cancelRequests()
Cancels all requests issued using current accessor.
|
TResponse |
close(TPreparedXQuery pQuery)
Removes prepared XQuery.
|
TResponse |
delete(TQuery xPath)
Deletes a set of XML documents implicitly given by the specified xpath query.
|
TResponse |
delete(TXMLObject xmlObject)
Deletes the XML document represented by the TXMLObject instance within the Tamino database.
|
java.lang.String |
getApplicationName()
Returns Client Application Name
|
boolean |
getCanBeCancelled()
Gets whether request can be canBeCanceled.
|
long |
getMaximumRequestDuration()
Gets the maximum request duration in seconds.
|
TScroll |
getScrollType()
Gets the scroll type.
|
TResponse |
insert(TXMLObject xmlObject)
Inserts the XML document represented by the TXMLObject instance into the Tamino database.
|
TResponse |
query(TQuery xPath)
Queries for a specific set of XML documents stored within Tamino.
|
TResponse |
query(TQuery xPath,
int quantity)
Queries for a specific set of XML documents stored within Tamino.
|
TXMLObject |
retrieve(TXMLObject xmlObject)
Retrieves a single XML document from Tamino in the state as it has been inserted.
|
TStreamHeader |
retrieveHeader(TXMLObject xmlObject)
Just retrieves the īmeta? data of a single document from Tamino.
|
void |
setAccessLocation(TAccessLocation accessLocation)
Sets the accessor properties.
|
void |
setApplicationName(java.lang.String applicationName)
Sets Client Applicatin Name.
|
void |
setCanBeCancelled(boolean canBeCancelled)
Sets whether request can be canBeCanceled.
|
void |
setMaximumRequestDuration(long maximumRequestDuration)
Sets the maximum request duration in seconds.
|
void |
setScrollType(TScroll type)
Sets the scroll type.
|
TResponse |
update(TXMLObject xmlObject)
Updates the XML document represented by the TXMLObject instance within the Tamino database.
|
TResponse |
xquery(TPreparedXQuery xquery)
Queries Tamino to retrieve a set of XML documents that satisfies
the prepared xquery expression.
|
TResponse |
xquery(TPreparedXQuery xquery,
int quantity)
Queries Tamino to retrieve a set of XML documents that satisfies
the prepared xquery expression.
|
TResponse |
xquery(TXQuery xquery)
Queries Tamino to retrieve a set of XML documents that satisfies
the xquery expression.
|
TResponse |
xquery(TXQuery xquery,
int quantity)
Queries Tamino to retrieve a set of XML documents that satisfies
the xquery expression.
|
getAccessCollection, getAccessLocation, getDatabaseUri, getInvocation, getLocale, getLockMode, getLockwaitMode, invalidate, invoke, invoke, invoke, setInvocation, setLockMode, setLockwaitMode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAccessLocation, getLockMode, getLockwaitMode, setLockMode, setLockwaitMode
invalidate
public TXMLObjectAccessorImpl(TStreamAccessor streamAccessor, TResponseBuilder responseBuilder)
streamAccessor
- responseBuilder
- public TResponse insert(TXMLObject xmlObject) throws TInsertException
!xmlObject.hasDocname() | Insert. |
xmlObject.hasDocname() | Insert, if a document with the given ino:docname is not given yet. |
xmlObject.hasDocname() | Update, if a document with the given ino:docname is already given yet. |
insert
in interface TXMLObjectAccessor
xmlObject
- is the representation of the XML document that should be stored within Tamino.TInsertException
- signals an error while attempting the insert operation.public TResponse update(TXMLObject xmlObject) throws TUpdateException
xmlObject.hasId() | Update. |
!xmlObject.hasId() && xmlObject.hasDocname() | Update, if the document with the given docname is existant. |
!xmlObject.hasId() && xmlObject.hasDocname() | Insert, if the document with the given docname is not existant. |
update
in interface TXMLObjectAccessor
xmlObject
- is the representation of the XML document that should be updated within Tamino.TUpdateException
- due to problems when initiating the update request.public TResponse delete(TXMLObject xmlObject) throws TDeleteException
delete
in interface TXMLObjectAccessor
xmlObject
- is the representation of the XML document that should be deleted within Tamino.TDeleteException
- due to any problems during the deletion of the given TXMLObject instance.public TResponse delete(TQuery xPath) throws TDeleteException
delete
in interface TXMLObjectAccessor
xpath
- denotes the XPath expresssion which references a set of XML documents that should be deleted.TDeleteException
- due to any problems during the deletion of the query set specified by the query.public TResponse query(TQuery xPath) throws TQueryException
query
in interface TXMLObjectAccessor
xpath
- denotes the XPath expresssion which references a set of XML documents that should be retrieved.TQueryException
- due to any problems during the query of the implicitly given query set.public TResponse xquery(TXQuery xquery) throws TXQueryException
This feature requires Tamino 4.1
xquery
in interface TXMLObjectAccessor
xquery
- query expression which specifies a set of XML documents to be retrieved.TXQueryException
- signals an error while attempting the query operation.public TResponse xquery(TPreparedXQuery xquery) throws TXQueryException
This feature requires Tamino 4.4
xquery
in interface TXMLObjectAccessor
xquery
- prepared query expression which specifies a set of XML documents to be retrieved.TXQueryException
- signals an error while attempting the query operation.public TResponse xquery(TPreparedXQuery xquery, int quantity) throws TXQueryException
This feature requires Tamino 4.4
xquery
in interface TXMLObjectAccessor
xquery
- prepared query expression which specifies a set of XML documents to be retrieved.quantity
- the number of documents to be retrieved in each step.TXQueryException
- signals an error while attempting the query operation.public TResponse query(TQuery xPath, int quantity) throws TQueryException
query
in interface TXMLObjectAccessor
xpath
- denotes the XPath expresssion which references a set of XML documents that should be retrieved.quantity
- denotes the quantity of documents which will be loaded with a single call from Tamino.
However, the iterator returned from the response object hides this.TQueryException
- due to any problems during the query of the implicitly given query set.public TResponse xquery(TXQuery xquery, int quantity) throws TXQueryException
Please note, this operation can only be used in a local transaction mode. This is due to the fact that it makes use of a Tamino cursor which can only be used in a transactional context. The obtained result set is only available while the current local transaction is open. A commit, rollback or change of the transaction mode will terminate the transaction and invalidate the TXMLObjectIterator.
This feature requires Tamino 3.1
xquery
in interface TXMLObjectAccessor
xquery
- query expression which specifies a set of XML documents to be retrieved.quantity
- the number of documents to be retrieved in each step.TXQueryException
- signals an error while attempting the query operation.public TXMLObject retrieve(TXMLObject xmlObject) throws TRetrieveException
retrieve
in interface TXMLObjectAccessor
xmlObject
- represents an instance which internal object model shall be updated by a retrieved
document that is specified thru the doctype and id or docname information of the xmlObject.TRetrieveException
- due to any problems during the retrieval of the single document.public TStreamHeader retrieveHeader(TXMLObject xmlObject) throws TRetrieveException
Just retrieves the īmeta? data of a single document from Tamino. This data is retrieved by its docname or id as set in the TXMLObject instance passed as input parameter and not by a query expression. If both docname and id are present in the TXMLObject instance, the docname is used.
This method behaves like the retrieve()
method except that
it does not retieve the whole document but only its īmeta? data, which is
contained in the TStreamHeader
.
retrieveHeader
in interface TXMLObjectAccessor
xmlObject
- a TXMLObject instance specifying by its doctype, id or docname information
which document to retrieve from Tamino.TRetrieveException
- signals an error while attempting the retrieve operation.com.softwareag.tamino.db.api.accessor.TStreamAccessor#retrieve(TXMLObject)
public void setAccessLocation(TAccessLocation accessLocation)
setAccessLocation
in interface TAccessor
setAccessLocation
in class TAbstractAccessor
accessLocation
- the TAccessLocation instance to be used by the accessor.public void setScrollType(TScroll type)
setScrollType
in interface TXMLObjectAccessor
type
- - specifies whether cursor is scrollable or not.public TScroll getScrollType()
getScrollType
in interface TXMLObjectAccessor
public void setMaximumRequestDuration(long maximumRequestDuration)
setMaximumRequestDuration
in interface TAccessor
setMaximumRequestDuration
in class TAbstractAccessor
maximumRequestDuration
- the maximum request duration in seconds in seconds be set, TConnection.DEFAULT_TIMEOUT for Tamino default.public long getMaximumRequestDuration()
getMaximumRequestDuration
in interface TAccessor
getMaximumRequestDuration
in class TAbstractAccessor
maximumRequestDuration
- the maximum request duration in seconds in seconds be set, TConnection.DEFAULT_TIMEOUT for Tamino default.public void setCanBeCancelled(boolean canBeCancelled) throws TAdminException
setCanBeCancelled
in interface TAccessor
setCanBeCancelled
in class TAbstractAccessor
TAdminException
public boolean getCanBeCancelled()
getCanBeCancelled
in interface TAccessor
getCanBeCancelled
in class TAbstractAccessor
TAdminException
public void cancelRequests() throws TAdminException
cancelRequests
in interface TAccessor
cancelRequests
in class TAbstractAccessor
TAdminException
public TResponse close(TPreparedXQuery pQuery) throws TXQueryException
close
in interface TXMLObjectAccessor
pQuery
- the TPreparedXQuery to be removed.TXQueryException
- due to Prepared XQuery access problems.public void setApplicationName(java.lang.String applicationName)
setApplicationName
in interface TAccessor
setApplicationName
in class TAbstractAccessor
public java.lang.String getApplicationName()
getApplicationName
in interface TAccessor
getApplicationName
in class TAbstractAccessor
Copyright (c) 2017 Software AG. All Rights Reserved.