com.softwareag.tamino.db.api.accessor
Class TSchemaDefinition2AccessorImpl
java.lang.Object
com.softwareag.tamino.db.api.accessor.TAbstractAccessor
com.softwareag.tamino.db.api.accessor.TAbstractSchemaDefinitionAccessor
com.softwareag.tamino.db.api.accessor.TSchemaDefinition2AccessorImpl
- All Implemented Interfaces:
- TAccessor, TInvalidatableAccessor, TSchemaDefinition2Accessor
- Direct Known Subclasses:
- TSchemaDefinition2AccessorTimeLoggingImpl
public class TSchemaDefinition2AccessorImpl
- extends TAbstractSchemaDefinitionAccessor
- implements TSchemaDefinition2Accessor
TSchemaDefinition2AccessorImpl implements TSchemaDefinition2Accessor and realizes the concrete meta data access to Tamino.
for TSD 2 based schemas.
- Version:
- $Revision: 1.21 $
- Author:
- Marcus Schreyer
Method Summary |
TResponse |
getCollection(java.lang.String collection)
Gets the collection with the specified name and hands back the result as a TResponse object. |
java.util.Iterator<java.lang.String> |
getCollectionNames()
Gets the iterator for the list of all collection names stored within Tamino. |
TResponse |
getSchema(java.lang.String collection,
java.lang.String schema)
Gets the schema or multiple schemas for the given collection and schema and hands back the result
as a TResponse object. |
java.util.Iterator<java.lang.String> |
getSchemaNames(java.lang.String collection)
Gets the iterator for the list of schema names given within the specified collection, or if no collection
is given all schema names currently stored under the connected database. |
Methods inherited from class com.softwareag.tamino.db.api.accessor.TAbstractAccessor |
getAccessCollection, getAccessLocation, getApplicationName, getCanBeCancelled, getDatabaseUri, getInvocation, getLocale, getLockMode, getLockwaitMode, getMaximumRequestDuration, invalidate, invoke, invoke, invoke, setApplicationName, setInvocation, setLockMode, setLockwaitMode |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.softwareag.tamino.db.api.accessor.TAccessor |
cancelRequests, getAccessLocation, getApplicationName, getCanBeCancelled, getLockMode, getLockwaitMode, getMaximumRequestDuration, setAccessLocation, setApplicationName, setCanBeCancelled, setLockMode, setLockwaitMode, setMaximumRequestDuration |
TSchemaDefinition2AccessorImpl
public TSchemaDefinition2AccessorImpl(TStreamAccessor streamAccessor,
TResponseBuilder responseBuilder)
- Special Constructor. Initializes the accessor with the given TXMLStreamAccessor and
TResponseBuilder.
- Parameters:
streamAccessor,
- internally needed for core stream access.responseBuilder,
- needed for building high level response objects.
getCollectionNames
public java.util.Iterator<java.lang.String> getCollectionNames()
throws TQueryException
- Gets the iterator for the list of all collection names stored within Tamino.
- Specified by:
getCollectionNames
in interface TSchemaDefinition2Accessor
- Returns:
- Iterator The iterator over the collection names given as String instances. If none are given,
the iterator indicates this with iterator.hasNext() == false.
- Throws:
TQueryException
- if the query for the collection names fails.
getSchemaNames
public java.util.Iterator<java.lang.String> getSchemaNames(java.lang.String collection)
throws TQueryException
- Gets the iterator for the list of schema names given within the specified collection, or if no collection
is given all schema names currently stored under the connected database.
- Specified by:
getSchemaNames
in interface TSchemaDefinition2Accessor
- Parameters:
collection
- specifies the collection for which all schema names have to be delivered. If this is not
specified all schema names are requested.
- Returns:
- Iterator The iterator over the schema names within the specified collection. In case no collection
is given all schema names stored under Tamino are delivered. If no schema names are found, the
iterator indicates this with iterator.hasNext() == false.
- Throws:
TQueryException
- if the query for the schema names fails.
getCollection
public TResponse getCollection(java.lang.String collection)
throws TQueryException
- Gets the collection with the specified name and hands back the result as a TResponse object. Multiple collections
are handed back if no collection name is given, these are then all collections that are stored under the connected
Tamino database.
- Specified by:
getCollection
in interface TSchemaDefinition2Accessor
- Parameters:
collection
- specifies the collection for which the query has been invoked. If no collection is given all
collections are referenced that are stored under the connected Tamino database.
- Returns:
- TResponse providing access to the collection information by getXMLObjectIterator indirectly or by
getFirstXMLObject directly. Multiple collections are handed back in case no collection has been provided.
- Throws:
TQueryException
- if the query for the collection fails.
getSchema
public TResponse getSchema(java.lang.String collection,
java.lang.String schema)
throws TQueryException
- Gets the schema or multiple schemas for the given collection and schema and hands back the result
as a TResponse object. Whether a result set is handed back strongly depends on whether the collection
and schema information are given. If this is the case only the relevant schema is handed back. Generally
depending on the provided arguments the following results are handed back regarding the requested schemas:
- collection != null && schema != null , the schema within the specified collection and the given schema name.
- collection != null && schema == null , all schemas within the specified collection.
- collection == null && schema != null , all schemas with the given schema name.
- collection == null && schema == null , all schemas globally given.
- Specified by:
getSchema
in interface TSchemaDefinition2Accessor
- Parameters:
collection
- specifies the Tamino collection for which schemas are requested.schema
- specifies the schema name for which schemas are requested.
- Returns:
- TResponse containing the TXMLObjectIterator for the access to requested schemas.
Note, that the first schema instance can also be accessed by the getFirstXMLObject
method provided within TResponse.
- Throws:
TQueryException
- if the query for the given schema fails.
Copyright (c) 2013 Software AG. All Rights Reserved.