public interface TStreamAccessor extends TAccessor
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.
|
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 dataObject input parameter in the Tamino database.
|
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 document represented by the TDataObject instance in the Tamino database.
|
TInputStream |
delete(TQuery query)
Deletes a set of documents specified by the X-Query expression.
|
TInputStream |
execute(TPreparedXQuery xQuery)
Executes prepared XQuery.
|
TInputStream |
fetchCursor(java.lang.String cursorHandle,
int cursorPosition,
int fetchQuantity)
Fetches a number of documents from a cursor.
|
TScroll |
getScrollType()
Gets the scroll type.
|
TInputStream |
insert(TDataObject dataObject)
Inserts the document represented by the TDataObject instance
into the Tamino database.
|
TInputStream |
openCursor(TPreparedXQuery xquery)
Opens a Tamino cursor for a set of documents that satisfies the PreparedXQuery 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 query)
Opens a Tamino cursor for a set of documents that satisfies the query expression.
|
TInputStream |
openCursor(TQuery query,
int cursorPosition,
int fetchQuantity)
Opens a Tamino cursor for a set of documents that satisfies the query expression.
|
TInputStream |
openCursor(TXQuery xquery)
Opens a Tamino cursor for a set of documents that satisfies the X-Query 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 query)
Queries Tamino to retrieve a set of documents that satisfies
the query expression.
|
TInputStream |
retrieve(TDataObject dataObject)
Retrieves a single document from Tamino.
|
TStreamHeader |
retrieveHeader(TDataObject dataObject)
Just retrieves the ´meta´ data of a single document from Tamino.
|
void |
setScrollType(TScroll scroll)
Sets the scroll type ('yes' or 'no').
|
TInputStream |
undefine(java.lang.String collection,
java.lang.String schema)
Undefines a schema specified by its name from the specified collection.
|
TInputStream |
undefine(TUndefineItem[] undefineItems)
In order to undefine a schema cluster, it is possible to specify a list of objects in an
_UNDEFINE command:
_UNDEFINE=undefineList
where-
undefineList -> undefineItem[, undefineItem]*
undefineItem -> collection[/schema[/doctype]]
|
TInputStream |
update(TDataObject dataObject)
Updates the document represented by the TDataObject instance in
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.
|
cancelRequests, getAccessLocation, getApplicationName, getCanBeCancelled, getLockMode, getLockwaitMode, getMaximumRequestDuration, setAccessLocation, setApplicationName, setCanBeCancelled, setLockMode, setLockwaitMode, setMaximumRequestDuration
invalidate
TInputStream insert(TDataObject dataObject) throws TInsertException
!dataObject.hasDocname() | Insert. |
dataObject.hasDocname() | Insert, if a document with the given ino:docname does not exist. |
dataObject.hasDocname() | Update, if a document with the given ino:docname already exists. |
dataObject
- the representation of the Tamino document that should be stored within Tamino.TInsertException
- signals an error while attempting the insert operation.TInputStream update(TDataObject dataObject) throws TUpdateException
dataObject.hasId() | Update, if the document with the given id exists. |
dataObject.hasId() | Insert, if the document with the given id does not exist. |
!dataObject.hasId() && dataObject.hasDocname() | Update, if the document with the given docname exists. |
!dataObject.hasId() && dataObject.hasDocname() | Insert, if the document with the given docname does not exist. |
dataObject
- the representation of the document that should be updated in Tamino.TUpdateException
- signals an error while attempting the update operation.TInputStream delete(TDataObject dataObject) throws TDeleteException
dataObject
- the representation of the XML document to be deleted from Tamino.TDeleteException
- signals an error while attempting the delete operation.TInputStream delete(TQuery query) throws TDeleteException
query
- query expression which specifies a set of documents to be deleted.TDeleteException
- signals an error while attempting the delete operation.TInputStream query(TQuery query) throws TQueryException
query
- query expression which specifies a set of documents to be retrieved.TQueryException
- signals an error while attempting the query operation.TInputStream xquery(TXQuery xQuery) throws TXQueryException
This feature requires Tamino 4.1
xQuery
- is the xquery expression.TXQueryException
- due to access problems.TInputStream prepare(TPreparedXQuery xQuery) throws TXQueryException
This feature requires Tamino 4.4
xQuery
- is the xquery expression.TXQueryException
- due to access problems.TInputStream execute(TPreparedXQuery xQuery) throws TXQueryException
This feature requires Tamino 4.4
xQuery
- is the xquery expression.TXQueryException
- due to access problems.TInputStream retrieve(TDataObject dataObject) throws TRetrieveException
Retrieves a single document from Tamino. The document 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.
The document returned is in principle the same as the document contained in the result set returned by a query expression of the following format:
<Root>/[ino:id=<id>] <Root>/[ino:docname=<docname>]
If an XML document is retrieved, there is a number of differences between the XML document as returned by one of these queries and the XML document as returned by the retrieve method. The retrieve method returns the XML document as it was originally stored in Tamino without additional Tamino-specific attributes and complete with XML meta-information like prologue information. In detail the differences are:
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.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
.
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.retrieve(TDataObject)
TInputStream define(TDataObject dataObject) throws TDefineException
dataObject
- containing the schema to be defined in Tamino.TDefineException
- signals an error while attempting the define operation.TInputStream define(TDataObject[] dataObjects) throws TDefineException
array
- of dataObjects containing the schemas to be defined in Tamino.TDefineException
- signals an error while attempting the define operation.TInputStream define(TDataObject dataObject, boolean asTest) throws TDefineException
dataObject
- containing the TSD3 schema to be defined in Tamino.asTest
- indicates if the input schema should only be tested. If true the schema is tested otherwise
the schema is physically defined.TDefineException
- signals an error while attempting the define operation. Note that this exception
is not thrown in case of logical errors in the input schema. These errors are indicated in the
response document returned by Tamino.TInputStream define(TDataObject dataObject, TDefineMode defineMode) throws TDefineException
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.TInputStream define(TDataObject[] dataObjects, TDefineMode defineMode) throws TDefineException
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.TInputStream undefine(java.lang.String collection, java.lang.String schema) throws TUndefineException
collection
- name of the Tamino collection.schema
- name of a Tamino schema, if null or an empty string the collection is undefined.TUndefineException
- signals an error while attempting the undefine operation.TInputStream undefine(TUndefineItem[] undefineItems) throws TUndefineException
undefineItems
- Array of undefineItems.TUndefineException
- signals an error while attempting the undefine operation.TUndefineItem
TInputStream openCursor(TQuery query) throws TCursorException
This feature requires Tamino 3.1
query
- expression which specifies a set of XML documents to be retrieved.TCursorException
- signals an error while attempting the open cursor operation.TInputStream openCursor(TXQuery xquery) throws TCursorException
This feature requires Tamino 4.1
xquery
- expression which specifies a set of XML documents to be retrieved.TCursorException
- signals an error while attempting the open cursor operation.TInputStream openCursor(TPreparedXQuery xquery) throws TCursorException
This feature requires Tamino 4.1
xquery
- expression which specifies a set of XML documents to be retrieved.TCursorException
- signals an error while attempting the open cursor operation.TInputStream openCursor(TQuery query, int cursorPosition, int fetchQuantity) throws TCursorException
This feature requires Tamino 3.1
query
- 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.TInputStream openCursor(TXQuery xquery, int cursorPosition, int fetchQuantity) throws TCursorException
This feature requires Tamino 4.1
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.TInputStream openCursor(TPreparedXQuery xquery, int cursorPosition, int fetchQuantity) throws TCursorException
This feature requires Tamino 4.1
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.TInputStream fetchCursor(java.lang.String cursorHandle, int cursorPosition, int fetchQuantity) throws TCursorException
This feature requires Tamino 3.1
cursorHandle
- the cursor handle identifying the Tamino cursor.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 fetch cursor operation.TInputStream closeCursor(java.lang.String cursorHandle) throws TCursorException
This feature requires Tamino 3.1
cursorHandle
- the cursor handle identifying the Tamino cursor.TCursorException
- signals an error while attempting the close cursor operation.TInputStream admin(java.lang.String commandValue) throws TAdminException
TAdminException
- signals an error while executimg the command.void setScrollType(TScroll scroll)
scroll
- - specifies whether cursor is scrollable or not.TScroll getScrollType()
TInputStream close(TPreparedXQuery pQuery) throws TXQueryException
pQuery
- is the Prepared XQuery to be removed.TXQueryException
- due to access problems.Copyright (c) 2017 Software AG. All Rights Reserved.