All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.dataselectors.filters
Class FilterItemRootToAdvancedList

    com.sas.dataselectors.filters.FilterItemRootToAdvancedList

All Implemented Interfaces:
  SimpleLogicListInterface, java.lang.Iterable, java.util.Collection, java.util.List

    public class FilterItemRootToAdvancedList

This class converts a Filter that may be a compound filter into a simple list of test nodes (via the FilterItemSimpleTree class).

Field Summary

Fields inherited from class com.sas.dataselectors.filters.AbstractFilterItemSimpleListBase
`_filterItemList, _filterTestNodeList`

Constructor Summary
`FilterItemRootToAdvancedList(FilterItemListInterface filterItemList, java.lang.Object rootFilterItem, boolean enforceAsAllSameType, FilterObjectFactoryInterface filterObjectFactory, boolean useStepModel)` Constructs a new advanced list with the given attributes.
`FilterItemRootToAdvancedList(FilterItemListInterface filterItemList, SimpleFilterLogicTreeInterface filterTree)` Constructs a new advanced list from the given sources.

Method Summary
`protected void` | `addTestNodeAt(int index, FilterLogicTestNodeInterface testNode)` Adds the given test node at the specified location in the list.
`void` | `clear()` Removes all of the elements from this collection (optional operation).
`boolean` | `commitChanges()` Commits any changes in the filter model to the underlying native model.
`SimpleFilterLogicTreeInterface` | `getFilterLogicTree()` Returns the filter logic tree for this list.
`java.lang.Object` | `getRootFilterObject()` Returns the native filter object.
`protected java.lang.Object` | `getTestNodeAt(int index)` Returns the test node at the specified location in the list.
`boolean` | `isEmpty()`
`protected java.lang.Object` | `removeTestNodeAt(int index)` Removes and returns the test node at the specified index in the list.
`SimpleFilterLogicTreeInterface` | `setFilterLogicTree(SimpleFilterLogicTreeInterface newTree)` Assigns the filter logic tree for this list.
`protected java.lang.Object` | `setTestNodeAt(int index, FilterLogicTestNodeInterface testNode)` Assigns the given test node at the specified location in the list.
`int` | `size()`

Methods inherited from class com.sas.dataselectors.filters.AbstractFilterItemSimpleListBase
`add, add, addAll, addAll, contains, containsAll, equals, get, getFilterItemList, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray`

Constructor Detail

### FilterItemRootToAdvancedList

    public FilterItemRootToAdvancedList(FilterItemListInterface filterItemList,
                                        java.lang.Object rootFilterItem,
                                        boolean enforceAsAllSameType,
                                        FilterObjectFactoryInterface filterObjectFactory,
                                        boolean useStepModel)

  Constructs a new advanced list with the given attributes.

  Parameters:
    `filterItemList` - the list of filter items in the filter model
    `rootFilterItem` - the native filter object to process
    `enforceAsAllSameType` - flag for restricting logical conditions
    `filterObjectFactory` - the object factory used during conversions between the filter model and native model
    `useStepModel` - flag for specifying whether the native filter should be in the step model or not

### FilterItemRootToAdvancedList

    public FilterItemRootToAdvancedList(FilterItemListInterface filterItemList,
                                        SimpleFilterLogicTreeInterface filterTree)

  Constructs a new advanced list from the given sources.

  Parameters:
    `filterItemList` - the list of filter items in the filter model
    `filterTree` - the logic tree to process

Method Detail

### commitChanges

    public boolean commitChanges()

  Commits any changes in the filter model to the underlying native model.

  Specified by:
    `commitChanges` in interface `SimpleLogicListInterface`
  Specified by:
    `commitChanges` in class `AbstractFilterItemSimpleListBase`
  Returns:
    true if the native model was successfully updated, false otherwise

### getRootFilterObject

    public java.lang.Object getRootFilterObject()

  Returns the native filter object.

  Specified by:
    `getRootFilterObject` in interface `SimpleLogicListInterface`
  Specified by:
    `getRootFilterObject` in class `AbstractFilterItemSimpleListBase`
  Returns:
    the native filter object

### setTestNodeAt

    protected java.lang.Object setTestNodeAt(int index,
                                             FilterLogicTestNodeInterface testNode)

  Assigns the given test node at the specified location in the list.

  Overrides:
    `setTestNodeAt` in class `AbstractFilterItemSimpleListBase`
  Parameters:
    `index` - the index in the list to assign the test node
    `testNode` - the test node to assign to the list
  Returns:
    the test node previously occupying the specified index in the list

### removeTestNodeAt

    protected java.lang.Object removeTestNodeAt(int index)

  Removes and returns the test node at the specified index in the list.

  Overrides:
    `removeTestNodeAt` in class `AbstractFilterItemSimpleListBase`
  Parameters:
    `index` - the index in the list of the target test node
  Returns:
    the test node that was removed from the list

### addTestNodeAt

    protected void addTestNodeAt(int index,
                                 FilterLogicTestNodeInterface testNode)

  Adds the given test node at the specified location in the list.

  Overrides:
    `addTestNodeAt` in class `AbstractFilterItemSimpleListBase`
  Parameters:
    `index` - the index in the list to add the test node
    `testNode` - the test node to assign to the list

### getTestNodeAt

    protected java.lang.Object getTestNodeAt(int index)

  Returns the test node at the specified location in the list.

  Overrides:
    `getTestNodeAt` in class `AbstractFilterItemSimpleListBase`
  Parameters:
    `index` - the index in the list of the target test node
  Returns:
    the test node

### getFilterLogicTree

    public SimpleFilterLogicTreeInterface getFilterLogicTree()

  Returns the filter logic tree for this list.

  Returns:
    the filter logic tree

### setFilterLogicTree

    public SimpleFilterLogicTreeInterface setFilterLogicTree(SimpleFilterLogicTreeInterface newTree)

  Assigns the filter logic tree for this list.

  Parameters:
    `newTree` - the new filter logic tree
  Returns:
    the existing filter logic tree (if available)

### isEmpty

    public boolean isEmpty()

  Specified by:
    `isEmpty` in interface `java.util.Collection`
  Specified by:
    `isEmpty` in interface `java.util.List`
  Overrides:
    `isEmpty` in class `AbstractFilterItemSimpleListBase`
  Returns:
    TRUE if this collection contains no elements, FALSE otherwise
  See Also:
    `Collection.isEmpty()`

### size

    public int size()

  Specified by:
    `size` in interface `java.util.Collection`
  Specified by:
    `size` in interface `java.util.List`
  Overrides:
    `size` in class `AbstractFilterItemSimpleListBase`
  Returns:
    the number of elements in this collection
  See Also:
    `Collection.size()`

### clear

    public void clear()

  Description copied from class: `AbstractFilterItemSimpleListBase`
  Removes all of the elements from this collection (optional operation). This collection will be empty after this method returns unless it throws an exception.

  Specified by:
    `clear` in interface `java.util.Collection`
  Specified by:
    `clear` in interface `java.util.List`
  Overrides:
    `clear` in class `AbstractFilterItemSimpleListBase`
  See Also:
    `Collection.clear()`

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.