javax.slee
Interface ChildRelation

All Superinterfaces:
java.util.Collection

public interface ChildRelation
extends java.util.Collection

The ChildRelation interface is used by SBBs that require child relationships with other SBBs. Any child-relation accessor method defined in an SBB abstract class must have this interface as its return type.

A ChildRelation object, and any java.util.Iterator objects obtained from it, are only valid within the transaction in which they materialized.

A ChildRelation object conforms to the Java Collections API with the following exceptions:

If a null parameter is passed to any method, a java.lang.NullPointerException is thrown.


Method Summary
 SbbLocalObject create()
          Create a new SBB entity of the SBB type associated with the relation.
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

create

public SbbLocalObject create()
                      throws CreateException,
                             TransactionRequiredLocalException,
                             SLEEException
Create a new SBB entity of the SBB type associated with the relation. The new SBB entity is automatically added to the relationship collection. The returned object may be cast to the required local interface type using the normal Java typecast mechanism.

This method is a mandatory transactional method.

Returns:
a local object reference to the created SBB entity.
Throws:
CreateException - if an SBB entity could not be created. This exception may have propagated from the SBB object's Sbb.sbbCreate() or Sbb.sbbPostCreate(), or may have been thrown by the SLEE.
TransactionRequiredLocalException - if this method is invoked without a valid transaction context.
SLEEException - if the child SBB could not be created due to a system-level failure.