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

  Constructors
  Constructor
  Description
  `TdbControlObjectList(TdbControlObjectList r)`
  Copy constructor, used to derive a list from an existing list; doesn't copy the last document reference
  `TdbControlObjectList(TdbSession session, TdbInterfaceType type)`
  Constructor, should only be used by a derived class

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `contains(String name)`
  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.
  `TdbControlObject`
  `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.

  ### 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.lang.Iterable

  `forEach`

  ### Methods inherited from interface java.util.List

  `equals, hashCode, replaceAll, sort, spliterator`

- ## Constructor Details

  - ### TdbControlObjectList

    public TdbControlObjectList(TdbSession session, TdbInterfaceType type) throws TdbException
    Constructor, should only be used by a derived class
    Parameters:
      `session` - Active session
      `type` - 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 Details

  - ### contains

    public boolean contains(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 for
      `type` - Type of control object to check for
    Returns:
      True if the list contains the specified object

  - ### get

    public TdbControlObject get(String name, TdbControlObjectType type)
    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

    public boolean contains(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> 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