public class TStreamAccessorImpl extends TAbstractAccessor implements TStreamAccessor
canBeCancelled, clientRequests, requestCounter, SGUAI
Constructor and Description |
---|
TStreamAccessorImpl(TAbstractAccessor abstractAccessor)
Special Constructor.
|
TStreamAccessorImpl(TAccessLocation accessLocation,
TInvocation invocation,
java.util.Locale locale)
Special Constructor.
|
Modifier and Type | Method and Description |
---|---|
TInputStream |
admin(java.lang.String commandValue)
Execute an administrative command with the given command value and
return the result as an input stream.
|
void |
cancelRequests()
Cancels all requests issued using current accessor.
|
TInputStream |
close(TPreparedXQuery pQuery)
Removes prepared XQuery.
|
TInputStream |
closeCursor(java.lang.String cursorHandle)
Releases a cursor.
|
TInputStream |
define(TDataObject dataObject)
Defines a schema represented by the given schema within the specified collection.
|
TInputStream |
define(TDataObject[] dataObjects)
Defines multiple schemas stored in an array of dataObjects.
|
TInputStream |
define(TDataObject[] dataObjects,
TDefineMode defineMode)
Defines multiple schemas stored in an array of dataObjects.
|
TInputStream |
define(TDataObject dataObject,
boolean asTest)
Deprecated.
Please use the method define( TDataObject dataObject, TDefineMode defineMode ) instead.
|
TInputStream |
define(TDataObject dataObject,
TDefineMode defineMode)
Defines a Tamino schema depending on the defineMode indicator into the current database.
|
TInputStream |
delete(TDataObject dataObject)
Deletes the XML document represented by the TXMLObject instance within the Tamino database.
|
TInputStream |
delete(TQuery xPath)
Deletes all documents implicitly given by the specified XPath statement.
|
TInputStream |
execute(TPreparedXQuery xQuery)
Executes prepared XQuery.
|
TInputStream |
fetchCursor(java.lang.String cursorHandle,
int cursorPosition,
int fetchQuantity)
Fetches the results from a openCursor() from Tamino.
|
TScroll |
getScrollType()
Returns the scroll type.
|
TInputStream |
insert(TDataObject dataObject)
Inserts the XML document represented by the TXMLObject instance into the Tamino database.
|
TInputStream |
openCursor(TPreparedXQuery xquery)
Opens a Tamino cursor for a set of documents that satisfies the TPreparedXQuery expression.
|
TInputStream |
openCursor(TPreparedXQuery xquery,
int cursorPosition,
int fetchQuantity)
Opens a Tamino cursor for a set of documents that satisfies the TPreparedXQuery expression.
|
TInputStream |
openCursor(TQuery xPath)
Opens a Tamino cursor quering for a specific set of XML documents stored within Tamino.
|
TInputStream |
openCursor(TQuery xPath,
int cursorPosition,
int fetchQuantity)
Opens a Tamino cursor quering for a specific set of XML documents stored within Tamino.
|
TInputStream |
openCursor(TXQuery xquery)
Opens a Tamino cursor for a set of documents that satisfies the xquery expression.
|
TInputStream |
openCursor(TXQuery xquery,
int cursorPosition,
int fetchQuantity)
Opens a Tamino cursor for a set of documents that satisfies the xquery expression.
|
TInputStream |
prepare(TPreparedXQuery xQuery)
In order to separate the compilation from the execution of XQuery Tamino provides interfaces for PREPARE and EXECUTE.
|
TInputStream |
query(TQuery xPath)
Queries for a specific set of XML documents stored within Tamino implicitly given by the specified XPath statement.
|
TInputStream |
retrieve(TDataObject dataObject)
Retrieves a single XML document from Tamino in the state as it has been inserted.
|
TStreamHeader |
retrieveHeader(TDataObject dataObject)
Just retrieves the īmeta? data of a single document from Tamino.
|
void |
setScrollType(TScroll scroll)
Sets the scroll type.
|
TInputStream |
undefine(java.lang.String collection,
java.lang.String schema)
Undefines a schema represented by the given schema within the specified collection.
|
TInputStream |
undefine(TUndefineItem[] undefineItems)
Undefines schemas specified by its name from the specified collection.
|
TInputStream |
update(TDataObject dataObject)
Updates the XML document represented by the TXMLObject instance within the Tamino database.
|
TInputStream |
xquery(TXQuery xQuery)
Queries for a specific set of XML documents stored within Tamino implicitly given by the specified XQuery statement.
|
getAccessCollection, getAccessLocation, getApplicationName, getCanBeCancelled, getDatabaseUri, getInvocation, getLocale, getLockMode, getLockwaitMode, getMaximumRequestDuration, invalidate, invoke, invoke, invoke, setAccessLocation, setApplicationName, setCanBeCancelled, setInvocation, setLockMode, setLockwaitMode, setMaximumRequestDuration
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAccessLocation, getApplicationName, getCanBeCancelled, getLockMode, getLockwaitMode, getMaximumRequestDuration, setAccessLocation, setApplicationName, setCanBeCancelled, setLockMode, setLockwaitMode, setMaximumRequestDuration
invalidate
public TStreamAccessorImpl(TAccessLocation accessLocation, TInvocation invocation, java.util.Locale locale)
accessLocation
- the shared access location.invocation
- the shared invocation.public TStreamAccessorImpl(TAbstractAccessor abstractAccessor)
abstractAccessor
- to get the shared properties from.public TInputStream insert(TDataObject dataObject) throws TInsertException
!dataObject.hasDocname() | Insert. |
dataObject.hasDocname() | Insert, if a document with the given ino:docname is not given yet. |
dataObject.hasDocname() | Update, if a document with the given ino:docname is already given yet. |
insert
in interface TStreamAccessor
dataObject
- is the representation of the Tamino document that should be stored within Tamino.TInsertException
- signals an error while attempting the insert operation.public TInputStream update(TDataObject dataObject) throws TUpdateException
dataObject.hasId() | Update. |
!dataObject.hasId() && nonXMLObject.hasDocname() | Update, if the document with the given docname is existant. |
!dataObject.hasId() && nonXMLObject.hasDocname() | Insert, if the document with the given docname is not existant. |
update
in interface TStreamAccessor
dataObject
- is the representation of the XML document that should be updated within Tamino.TUpdateException
- due to problems when initiating the update request.public TInputStream delete(TDataObject dataObject) throws TDeleteException
delete
in interface TStreamAccessor
dataObject
- is the representation of the XML document that should be deleted within Tamino.TDeleteException
- due to problems when initiating the delete request.public TInputStream delete(TQuery xPath) throws TDeleteException
delete
in interface TStreamAccessor
xPath
- denoted the XPath statement which references a set of documents stored in Tamino that should be deleted.TDeleteException
- due to problems when initiating the delete request.public TInputStream query(TQuery xPath) throws TQueryException
query
in interface TStreamAccessor
xPath
- denoted the XPath statement which references a set of xml documents stored in Tamino that should be retrieved.TQueryException
- due to access problems.public TInputStream retrieve(TDataObject dataObject) throws TRetrieveException
retrieve
in interface TStreamAccessor
dataObject
- needs to specify the doctype and an id or either docname.TRetrieveException
- due to any problems during the retrieval of the single document.public TStreamHeader retrieveHeader(TDataObject dataObject) 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 TDataObject instance passed as input parameter and not by a query expression. If both docname and id are present in the TDataObject instance, the docname is used.
This method behaves like the retrieve()
method except that
it does not retieve the whole document but only it īmeta? data, which is
contained in the TStreamHeader
.
retrieveHeader
in interface TStreamAccessor
dataObject
- a TDataObject instance specifying by its doctype, id or docname information
which document to retrieve from Tamino.TRetrieveException
- signals an error while attempting the retrieve operation.TStreamAccessor.retrieve(TDataObject)
public TInputStream define(TDataObject dataObject) throws TDefineException
define
in interface TStreamAccessor
dataObject
- denotes the schema instance which should be defined on Tamino. There is no side effect
when the schema is being defined on Tamino.TDefineException
- due to any problems that might occur when defining the schema.public TInputStream define(TDataObject dataObject, boolean asTest) throws TDefineException
define
in interface TStreamAccessor
dataObject
- denotes the schema instance which should be defined on Tamino. There is no side effect
when the schemaObject is being defined on Tamino.asTest
- indicates if define should only be tested. If set to true define is tested otherwise
the schema is physically defined.TDefineException
- if the define for the given schema instance fails. This is the case regardless
of the value for the asTest parameter.public TInputStream define(TDataObject dataObject, TDefineMode defineMode) throws TDefineException
define
in interface TStreamAccessor
dataObject
- denotes the schema instance which should be defined on Tamino. There is no side effect
when the schemaObject is being defined on Tamino.defineMode
- indicates if the input schema should only be tested and if it should be validated.TDefineException
- if the define for the given schema instance fails. This is the case regardless
of the value for the asTest parameter.public TInputStream define(TDataObject[] dataObjects) throws TDefineException
define
in interface TStreamAccessor
array
- of dataObjects containing the schemas to be defined in Tamino.TDefineException
- signals an error while attempting the define operation.public TInputStream define(TDataObject[] dataObjects, TDefineMode defineMode) throws TDefineException
define
in interface TStreamAccessor
array
- of dataObjects containing the schemas to be defined in Tamino.defineMode
- indicates if the input schema should only be tested and if it should be validated.TDefineException
- signals an error while attempting the define operation.public TInputStream undefine(java.lang.String collection, java.lang.String schema) throws TUndefineException
undefine
in interface TStreamAccessor
collection
- schema
- TUndefineException
- due to any problems that might occur when undefining the schema.public TInputStream undefine(TUndefineItem[] undefineItems) throws TUndefineException
undefine
in interface TStreamAccessor
collection
- name of the Tamino collection.schemas
- name of a Tamino schemas, if null or an empty string the collection is undefined.TUndefineException
- signals an error while attempting the undefine operation.TUndefineItem
public TInputStream openCursor(TQuery xPath) throws TCursorException
This feature requires Tamino 3.1
openCursor
in interface TStreamAccessor
xpath
- denotes the XPath expresssion which references a set of XML documents that should be retrieved.TCursorException
- due to any problems during the opening the cursor.public TInputStream openCursor(TXQuery xquery) throws TCursorException
This feature requires Tamino 4.1
openCursor
in interface TStreamAccessor
xquery
- expression which specifies a set of XML documents to be retrieved.TCursorException
- signals an error while attempting the open cursor operation.public TInputStream openCursor(TPreparedXQuery xquery) throws TCursorException
This feature requires Tamino 4.1
openCursor
in interface TStreamAccessor
xquery
- expression which specifies a set of XML documents to be retrieved.TCursorException
- signals an error while attempting the open cursor operation.public TInputStream openCursor(TQuery xPath, int cursorPosition, int fetchQuantity) throws TCursorException
This feature requires Tamino 3.1 In contrary to the query() method a cursor based query does not load the whole query set at once from the Tamino database. Instead for each iterator step one result ducument will be fetched from Tamino.
openCursor
in interface TStreamAccessor
xpath
- denotes the XPath expresssion which references a set of XML documents that should be retrieved.cursorPosition
- denotes which part of the result set shall be loaded (starts with 1)fetchQuantity
- denotes the number of documents loaded.TCursorException
- due to any problems during the opening the cursor.public TInputStream openCursor(TXQuery xquery, int cursorPosition, int fetchQuantity) throws TCursorException
This feature requires Tamino 4.1
openCursor
in interface TStreamAccessor
xquery
- expression which specifies a set of XML documents to be retrieved.cursorPosition
- the index of the first document in the result set to be returned. The first
document in the result set has index 1.fetchQuantity
- the number of documents to be returned.TCursorException
- signals an error while attempting the open cursor operation.public TInputStream openCursor(TPreparedXQuery xquery, int cursorPosition, int fetchQuantity) throws TCursorException
This feature requires Tamino 4.1
openCursor
in interface TStreamAccessor
xquery
- expression which specifies a set of XML documents to be retrieved.cursorPosition
- the index of the first document in the result set to be returned. The first
document in the result set has index 1.fetchQuantity
- the number of documents to be returned.TCursorException
- signals an error while attempting the open cursor operation.public TInputStream fetchCursor(java.lang.String cursorHandle, int cursorPosition, int fetchQuantity) throws TCursorException
This feature requires Tamino 3.1
fetchCursor
in interface TStreamAccessor
cursorHandle
- denotes the cursor handle which identifies the Tamino cursor.cursorPosition
- denotes which part of the result set shall be loaded (starts with 1)fetchQuantity
- denotes the number of documents loaded.TCursorException
- due to any problems during the opening the cursor.public TInputStream closeCursor(java.lang.String cursorHandle) throws TCursorException
This feature requires Tamino 3.1
closeCursor
in interface TStreamAccessor
cursorHandle
- the cursor handle identifying the Tamino cursor.TCursorException
- signals an error while attempting the close cursor operation.public TInputStream close(TPreparedXQuery pQuery) throws TXQueryException
close
in interface TStreamAccessor
pQuery
- the TPreparedXQuery to be removed.TXQueryException
- due to Prepared XQuery access problems.public TInputStream xquery(TXQuery xQuery) throws TXQueryException
This feature requires Tamino 4.1
xquery
in interface TStreamAccessor
xQuery
- is the xquery expression.TXQueryException
- due to access problems.public TInputStream prepare(TPreparedXQuery xQuery) throws TXQueryException
This feature requires Tamino 4.4
prepare
in interface TStreamAccessor
xQuery
- is the xquery expression.TXQueryException
- due to access problems.public TInputStream execute(TPreparedXQuery xQuery) throws TXQueryException
This feature requires Tamino 4.4
execute
in interface TStreamAccessor
xQuery
- is the xquery expression.TXQueryException
- due to access problems.public TInputStream admin(java.lang.String commandValue) throws TAdminException
admin
in interface TStreamAccessor
TAdminException
- signals an error while executimg the command.public void cancelRequests() throws TAdminException
cancelRequests
in interface TAccessor
cancelRequests
in class TAbstractAccessor
TAdminException
public void setScrollType(TScroll scroll)
setScrollType
in interface TStreamAccessor
scroll
- - specifies whether cursor is scrollable or not.public TScroll getScrollType()
getScrollType
in interface TStreamAccessor
Copyright (c) 2017 Software AG. All Rights Reserved.