wt.container.batch
Interface BatchContainer

All Known Subinterfaces:
AttributedRoleBatchContainer, RoleBatchContainer
All Known Implementing Classes:
AttributedRoleBatchContainerImpl, BatchContainerImpl, RoleBatchContainerImpl

public interface BatchContainer

The BatchContainer is a container of assertions used to collect add, remove, and replace actions for deferred action.

Supported API: true

Extendable: false


Field Summary
static String ELEMENTS
          Label for the attribute.
 
Method Summary
 boolean add(Object element)
          Adds the specified object to the batch container.
 boolean contains(Object element)
          Determine if the object is in the container.
 Enumeration elements()
          Return an Enumeration over the Objects in this BatchContainer.
 boolean populate(Enumeration a_Elements)
          Operation to allow the pre-population of container elements.
 boolean populate(Object a_Element)
          Operation to allow the pre-population of container elements.
 boolean remove(Object element)
          Removes the specified object from this BatchContainer.
 boolean replace(Object element)
          Used to indicate that an object has changed.
 int size()
          The number of objects in the container, not including removed objects.
 

Field Detail

ELEMENTS

public static final String ELEMENTS
Label for the attribute.

Supported API: false

See Also:
Constant Field Values
Method Detail

add

public boolean add(Object element)
Adds the specified object to the batch container. Returns false if the BatchContainer did not change based on the add, i.e. the object was already in the container. If the object is not already in the container then an AddAssertion is also added to the associated TransactionContainer.

Supported API: true

Parameters:
element -
Returns:
boolean

remove

public boolean remove(Object element)
Removes the specified object from this BatchContainer. Returns false if the BatchContainer is not changed by this operation, ie.e the object is not in the batch container. Regardless of whether the object is already in this BatchContainer a RemoveAssertion is created and added to the associated TransactionContainer.

Supported API: true

Parameters:
element -
Returns:
boolean

replace

public boolean replace(Object element)
Used to indicate that an object has changed. Returns true if the specified object is in the container. Regardless of whether the specified object is in the container, a ReplaceAsssertion will be created and added to the associated TransactionContainer.

Supported API: true

Parameters:
element -
Returns:
boolean

elements

public Enumeration elements()
Return an Enumeration over the Objects in this BatchContainer. Objects for which the most recent Assertion is a RemoveAssertion will not be included in the Enumeration

Supported API: true

Returns:
Enumeration

contains

public boolean contains(Object element)
Determine if the object is in the container. Objects for which a remove assertion has been applied will not be returned.

Supported API: true

Parameters:
element -
Returns:
boolean

size

public int size()
The number of objects in the container, not including removed objects.

Supported API: true

Returns:
int

populate

public boolean populate(Object a_Element)
Operation to allow the pre-population of container elements. This allows objects to be added to the container without creating a corresponding Assertion. Returns true if the BatchContainer changed due to this operation.

Supported API: true

Parameters:
a_Element -
Returns:
boolean

populate

public boolean populate(Enumeration a_Elements)
Operation to allow the pre-population of container elements. The container must be empty when populdate is called. Returns true if the BatchContainer changed due to this operation.

Supported API: true

Parameters:
a_Elements -
Returns:
boolean