Package com.tietoenator.trip.jxp.control
Class TdbControlObjectList
java.lang.Object
com.tietoenator.trip.jxp.session.TdbSessionObject
com.tietoenator.trip.jxp.TdbMessageProvider
com.tietoenator.trip.jxp.TdbMessageProvidingList<TdbControlObject>
com.tietoenator.trip.jxp.control.TdbControlObjectList
- All Implemented Interfaces:
com.tietoenator.trip.jxp.internal.utils.DOMSink
,Iterable<TdbControlObject>
,Collection<TdbControlObject>
,List<TdbControlObject>
- Direct Known Subclasses:
TdbClassificationSchemesList
,TdbDatabaseAccessList
,TdbDatabaseFieldList
,TdbDatabaseList
,TdbFormatList
,TdbGridClusterList
,TdbGridHostList
,TdbGridReplicaSetList
,TdbGroupAccessList
,TdbGroupList
,TdbGroupMemberList
,TdbOwnedDatabaseList
,TdbProcedureList
,TdbUserAccessList
,TdbUserList
public class TdbControlObjectList
extends TdbMessageProvidingList<TdbControlObject>
implements com.tietoenator.trip.jxp.internal.utils.DOMSink
Base class of all types of lists containing TdbControlObject elements. Use the
for-each pattern to iterate over elements in the list.
-
Constructor Summary
ConstructorsConstructorDescriptionCopy constructor, used to derive a list from an existing list; doesn't copy the last document referenceTdbControlObjectList
(TdbSession session, TdbInterfaceType type) Constructor, should only be used by a derived class -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if the list contains a control object specified by name.boolean
contains
(String name, TdbControlObjectType type) Checks if the list contains a control object specified by name and type.get
(String name, TdbControlObjectType type) Returns the specified control object if present in the list.void
refresh()
Refresh the list with the latest view from the server; note that if this list was constructed using the copy constructor from an existing list, this call will fail with an exception (UNEXPECTED_STATE) thrown.<T> List<T>
transform
(TdbTransformer<T> tx) Transform each element of the control object list, i.e. each control object in the list, to a new type using the factory interface provided.Methods inherited from class com.tietoenator.trip.jxp.TdbMessageProvidingList
add, add, addAll, addAll, clear, contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
Methods inherited from class com.tietoenator.trip.jxp.TdbMessageProvider
codeList, getLastCode, getLastMessage, hasMessages, messageList, resetMessages
Methods inherited from class com.tietoenator.trip.jxp.session.TdbSessionObject
cancel, getSession, isCancelable, setCancelable
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
Constructor Details
-
TdbControlObjectList
Constructor, should only be used by a derived class- Parameters:
session
- Active sessiontype
- Type of connection for which this list is valid- Throws:
TdbException
-
TdbControlObjectList
Copy constructor, used to derive a list from an existing list; doesn't copy the last document reference- Parameters:
r
- Existing list from which to copy- Throws:
TdbException
-
-
Method Details
-
contains
Checks if the list contains a control object specified by name and type.- Parameters:
name
- Name of control object to check fortype
- Type of control object to check for- Returns:
- True if the list contains the specified object
-
get
Returns the specified control object if present in the list.- Parameters:
name
- Name of control object to obtain.type
- Type of control object to obtain.- Returns:
- A TdbControlObject if found, else null.
-
contains
Checks if the list contains a control object specified by name.- Parameters:
name
- Name of control object to check for- Returns:
- True if the list contains the specified object This check disregards type. If the control object list contains multiple objects with the same name but of different type, this method will return true for the first object found matching the name.
-
refresh
Refresh the list with the latest view from the server; note that if this list was constructed using the copy constructor from an existing list, this call will fail with an exception (UNEXPECTED_STATE) thrown. This method causes network I/O.- Throws:
TdbException
-
transform
Transform each element of the control object list, i.e. each control object in the list, to a new type using the factory interface provided.- Type Parameters:
T
- The runtime type of each object that will be created by this transformation- Parameters:
tx
- The transformer capable of creating objects of type T from TdbControlObject- Returns:
- The new list
-