public interface ChildRelation extends Collection
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:
add and addAll methods throw
java.lang.UnsupportedOperationException if an attempt is made to modify
the collection. The create method should be used instead to add child SBB
entities to the collection.
clear,
remove, removeAll, or retainAll method call on
a ChildRelation object, or by a remove method call on
a java.util.Iterator object obtained from a ChildRelation
object, a cascade delete of the SBB entity tree rooted at the removed SBB entity
is initiated. This means that removing an SBB entity from a ChildRelation
collection has the same behavior as if the remove
method was invoked on the removed SBB entity itself.
java.lang.NullPointerException
is thrown.| Modifier and Type | Method and Description |
|---|---|
SbbLocalObject |
create()
Create a new SBB entity of the SBB type associated with the relation.
|
SbbLocalObject create() throws CreateException, TransactionRequiredLocalException, SLEEException
This method is a mandatory transactional method.
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.