Class TdbControlObjectList

    • Constructor Detail

      • 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 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 for
        type - 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