org.nakedobjects.metamodel.spec.feature
Interface OneToManyAssociation

All Superinterfaces:
CurrentHolder, FacetHolder, Identified, NakedObjectAssociation, NakedObjectFeature, NakedObjectMember, NamedAndDescribed, OneToManyFeature, Specification, TypedSpecification
All Known Implementing Classes:
OneToManyAssociationImpl

public interface OneToManyAssociation
extends NakedObjectAssociation, OneToManyFeature


Method Summary
 void addElement(NakedObject owningNakedObject, NakedObject objectToAdd)
          Add the specified element to this collection field in the specified object.
 void clearCollection(NakedObject inObject)
          Remove all elements from this collection field in the specified object.
 ValidityContext<?> createValidateAddInteractionContext(AuthenticationSession session, InteractionInvocationMethod invocationMethod, NakedObject owningNakedObject, NakedObject proposedObjectToAdd)
          Creates an InteractionContext that represents validation of a candidate object to be added to the collection.
 ValidityContext<?> createValidateRemoveInteractionContext(AuthenticationSession session, InteractionInvocationMethod invocationMethod, NakedObject owningNakedObject, NakedObject proposedObjectToRemove)
          Creates an InteractionContext that represents validation of a candidate object to be removed from the collection.
 Consent isValidToAdd(NakedObject owningNakedObject, NakedObject proposedObjectToAdd)
          Determines if the specified element can be added to the collection field, represented as a Consent.
 Consent isValidToRemove(NakedObject owningNakedObject, NakedObject proposedObjectToRemove)
          Determines if the specified element can be removed from the collection field, represented as a Consent.
 void removeElement(NakedObject owningNakedObject, NakedObject oObjectToRemove)
          Remove the specified element from this collection field in the specified object.
 
Methods inherited from interface org.nakedobjects.metamodel.spec.feature.NakedObjectAssociation
getBusinessKeyName, getChoices, getDefault, hasChoices, isEmpty, isMandatory, isNotDerived, toDefault
 
Methods inherited from interface org.nakedobjects.metamodel.spec.feature.NakedObjectMember
createUsableInteractionContext, createVisibleInteractionContext, debugData, getHelp, getId, isAction, isAssociation, isOneToManyAssociation, isOneToOneAssociation, isUsable, isVisible
 
Methods inherited from interface org.nakedobjects.metamodel.spec.TypedSpecification
getSpecification
 
Methods inherited from interface org.nakedobjects.metamodel.spec.Specification
getInstance
 
Methods inherited from interface org.nakedobjects.metamodel.spec.identifier.Identified
getIdentifier
 
Methods inherited from interface org.nakedobjects.metamodel.facets.FacetHolder
addFacet, addFacet, containsFacet, getFacet, getFacets, getFacetTypes, removeFacet, removeFacet
 
Methods inherited from interface org.nakedobjects.metamodel.spec.NamedAndDescribed
getDescription, getName
 
Methods inherited from interface org.nakedobjects.metamodel.spec.feature.CurrentHolder
get
 

Method Detail

createValidateAddInteractionContext

ValidityContext<?> createValidateAddInteractionContext(AuthenticationSession session,
                                                       InteractionInvocationMethod invocationMethod,
                                                       NakedObject owningNakedObject,
                                                       NakedObject proposedObjectToAdd)
Creates an InteractionContext that represents validation of a candidate object to be added to the collection.

Typically it is easier to just call isValidToAdd(NakedObject, NakedObject) or #isValidToAddResult(NakedObject, NakedObject); this is provided as API for symmetry with interactions (such as AccessContext accesses) have no corresponding vetoing methods.


isValidToAdd

Consent isValidToAdd(NakedObject owningNakedObject,
                     NakedObject proposedObjectToAdd)
Determines if the specified element can be added to the collection field, represented as a Consent.

If allowed the add method can be called with the same parameters, .

See Also:
#isValidToAddResult(NakedObject, NakedObject)

addElement

void addElement(NakedObject owningNakedObject,
                NakedObject objectToAdd)
Add the specified element to this collection field in the specified object.


createValidateRemoveInteractionContext

ValidityContext<?> createValidateRemoveInteractionContext(AuthenticationSession session,
                                                          InteractionInvocationMethod invocationMethod,
                                                          NakedObject owningNakedObject,
                                                          NakedObject proposedObjectToRemove)
Creates an InteractionContext that represents validation of a candidate object to be removed from the collection.

Typically it is easier to just call isValidToAdd(NakedObject, NakedObject) or #isValidToAddResult(NakedObject, NakedObject); this is provided as API for symmetry with interactions (such as AccessContext accesses) have no corresponding vetoing methods.


isValidToRemove

Consent isValidToRemove(NakedObject owningNakedObject,
                        NakedObject proposedObjectToRemove)
Determines if the specified element can be removed from the collection field, represented as a Consent.

If allowed the remove method can be called with the same parameters, .

See Also:
removeElement(NakedObject, NakedObject), #isValidToAddResult(NakedObject, NakedObject)

removeElement

void removeElement(NakedObject owningNakedObject,
                   NakedObject oObjectToRemove)
Remove the specified element from this collection field in the specified object.


clearCollection

void clearCollection(NakedObject inObject)
Remove all elements from this collection field in the specified object.



Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.