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
,java.lang.Iterable<TdbControlObject>
,java.util.Collection<TdbControlObject>
,java.util.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
Constructors Constructor Description TdbControlObjectList(TdbControlObjectList r)
Copy 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(java.lang.String name)
Checks if the list contains a control object specified by name.boolean
contains(java.lang.String name, TdbControlObjectType type)
Checks if the list contains a control object specified by name and type.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> java.util.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
-
-
-
-
Constructor Detail
-
TdbControlObjectList
public TdbControlObjectList(TdbSession session, TdbInterfaceType type) throws TdbException
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
public TdbControlObjectList(TdbControlObjectList r) throws TdbException
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 Detail
-
contains
public boolean contains(java.lang.String name, TdbControlObjectType type)
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
-
contains
public boolean contains(java.lang.String name)
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
public void refresh() throws TdbException
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
public <T> java.util.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.- 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
-
-