public class OneToOneAssociationImpl extends ObjectAssociationAbstract implements OneToOneAssociation
OneToOneAssociation.FunctionsObjectAssociation.Filters, ObjectAssociation.Predicates, ObjectAssociation.UtildefaultName| Modifier | Constructor and Description |
|---|---|
|
OneToOneAssociationImpl(FacetedMethod facetedMethod,
ObjectMemberContext objectMemberContext) |
protected |
OneToOneAssociationImpl(FacetedMethod facetedMethod,
ObjectSpecification objectSpec,
ObjectMemberContext objectMemberContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearAssociation(ObjectAdapter ownerAdapter)
Deprecated.
|
PropertyAccessContext |
createAccessInteractionContext(AuthenticationSession session,
InteractionInvocationMethod interactionMethod,
ObjectAdapter ownerAdapter)
TODO: currently this method is hard-coded to assume all interactions are
initiated
by user. |
UsabilityContext<?> |
createUsableInteractionContext(AuthenticationSession session,
InteractionInvocationMethod invocationMethod,
ObjectAdapter ownerAdapter,
org.apache.isis.applib.annotation.Where where)
Create an
InteractionContext to represent an attempt to
use this member (that is, to
check if it is usable or not). |
ValidityContext<?> |
createValidateInteractionContext(AuthenticationSession session,
InteractionInvocationMethod interactionMethod,
ObjectAdapter ownerAdapter,
ObjectAdapter proposedToReferenceAdapter)
Creates an
InteractionContext that represents validation of a
proposed new value for the property. |
VisibilityContext<?> |
createVisibleInteractionContext(AuthenticationSession session,
InteractionInvocationMethod invocationMethod,
ObjectAdapter ownerAdapter,
org.apache.isis.applib.annotation.Where where)
Create an
InteractionContext to represent an attempt to view this
member (that is, to check if it is visible or not). |
String |
debugData() |
ObjectAdapter |
get(ObjectAdapter ownerAdapter)
Returns the referenced
ObjectAdapter for the owning
ObjectAdapter. |
ObjectAdapter[] |
getAutoComplete(ObjectAdapter ownerAdapter,
String searchArg)
Returns a list of possible references/values for this field, which the
user can choose from, based on the provided search argument.
|
int |
getAutoCompleteMinLength() |
ObjectAdapter[] |
getChoices(ObjectAdapter ownerAdapter)
Returns a list of possible references/values for this field, which the
user can choose from.
|
ObjectAdapter |
getDefault(ObjectAdapter ownerAdapter)
Return the default for this property.
|
Instance |
getInstance(ObjectAdapter ownerAdapter)
|
boolean |
hasAutoComplete()
Whether there are any auto-complete provided (eg autoCompleteXxx supporting
method) for the association.
|
boolean |
hasChoices()
Whether there are any choices provided (eg choicesXxx supporting
method) for the association.
|
void |
initAssociation(ObjectAdapter ownerAdapter,
ObjectAdapter referencedAdapter)
Initialise this field in the specified object with the specified
reference - this call should only affect the specified object, and not
any related objects.
|
Consent |
isAssociationValid(ObjectAdapter ownerAdapter,
ObjectAdapter proposedToReferenceAdapter)
TODO: currently this method is hard-coded to assume all interactions are
initiated
by user. |
boolean |
isEmpty(ObjectAdapter ownerAdapter)
Returns
true if this field on the specified object is deemed
to be empty, or has no content. |
void |
set(ObjectAdapter ownerAdapter,
ObjectAdapter newReferencedAdapter)
Updates the referenced
ObjectAdapter for the owning
ObjectAdapter with the new value provided, or clears the
reference if null. |
void |
setAssociation(ObjectAdapter ownerAdapter,
ObjectAdapter newReferencedAdapter)
Deprecated.
|
void |
toDefault(ObjectAdapter ownerAdapter)
Set the property to it default references/values.
|
String |
toString() |
getBusinessKeyName, getSpecification, isMandatory, isNotPersisted, isOneToOneAssociationaddFacet, addFacet, containsDoOpFacet, containsFacet, getAdapterManager, getAuthenticationSession, getAuthenticationSessionProvider, getCollectionTypeRegistry, getDeploymentCategory, getDescription, getFacet, getFacetedMethod, getFacets, getFacetTypes, getFeatureType, getHelp, getId, getIdentifier, getName, getQuerySubmitter, getServicesProvider, getSpecification, getSpecificationLookup, isAction, isAlwaysHidden, isOneToManyAssociation, isPropertyOrCollection, isUsable, isVisible, removeFacet, removeFacetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBusinessKeyName, isMandatory, isNotPersistedgetHelp, isAction, isAlwaysHidden, isOneToManyAssociation, isOneToOneAssociation, isPropertyOrCollection, isUsable, isVisiblegetDescription, getId, getName, getSpecificationgetFeatureTypegetIdentifieraddFacet, addFacet, containsDoOpFacet, containsFacet, getFacet, getFacets, getFacetTypes, removeFacet, removeFacetpublic OneToOneAssociationImpl(FacetedMethod facetedMethod, ObjectMemberContext objectMemberContext)
protected OneToOneAssociationImpl(FacetedMethod facetedMethod, ObjectSpecification objectSpec, ObjectMemberContext objectMemberContext)
public VisibilityContext<?> createVisibleInteractionContext(AuthenticationSession session, InteractionInvocationMethod invocationMethod, ObjectAdapter ownerAdapter, org.apache.isis.applib.annotation.Where where)
ObjectMemberInteractionContext to represent an attempt to view this
member (that is, to check if it is visible or not).
Typically it is easier to just call
ObjectMember.isVisible(AuthenticationSession, ObjectAdapter, Where) or
#isVisibleResult(AuthenticationSession, ObjectAdapter); this is
provided as API for symmetry with interactions (such as
AccessContext accesses) have no corresponding vetoing methods.
createVisibleInteractionContext in interface ObjectMemberpublic UsabilityContext<?> createUsableInteractionContext(AuthenticationSession session, InteractionInvocationMethod invocationMethod, ObjectAdapter ownerAdapter, org.apache.isis.applib.annotation.Where where)
ObjectMemberInteractionContext to represent an attempt to
use this member (that is, to
check if it is usable or not).
Typically it is easier to just call
ObjectMember.isUsable(AuthenticationSession, ObjectAdapter, Where) or
#isUsableResult(AuthenticationSession, ObjectAdapter); this is
provided as API for symmetry with interactions (such as
AccessContext accesses) have no corresponding vetoing methods.
createUsableInteractionContext in interface ObjectMemberpublic ValidityContext<?> createValidateInteractionContext(AuthenticationSession session, InteractionInvocationMethod interactionMethod, ObjectAdapter ownerAdapter, ObjectAdapter proposedToReferenceAdapter)
OneToOneAssociationInteractionContext that represents validation of a
proposed new value for the property.
Typically it is easier to just call
OneToOneAssociation.isAssociationValid(ObjectAdapter, ObjectAdapter) or
#isAssociationValidResult(ObjectAdapter, ObjectAdapter); this is
provided as API for symmetry with interactions (such as
AccessContext accesses) have no corresponding vetoing methods.
createValidateInteractionContext in interface OneToOneAssociationpublic Consent isAssociationValid(ObjectAdapter ownerAdapter, ObjectAdapter proposedToReferenceAdapter)
by user.isAssociationValid in interface OneToOneAssociationpublic void initAssociation(ObjectAdapter ownerAdapter, ObjectAdapter referencedAdapter)
OneToOneAssociationinitAssociation in interface OneToOneAssociationpublic ObjectAdapter get(ObjectAdapter ownerAdapter)
CurrentHolderObjectAdapter for the owning
ObjectAdapter.
For example, if this is an OneToOneAssociation, then returns the
referenced object.
get in interface CurrentHolderget in class ObjectAssociationAbstractpublic PropertyAccessContext createAccessInteractionContext(AuthenticationSession session, InteractionInvocationMethod interactionMethod, ObjectAdapter ownerAdapter)
by user.createAccessInteractionContext in interface OneToOneAssociationpublic boolean isEmpty(ObjectAdapter ownerAdapter)
ObjectAssociationtrue if this field on the specified object is deemed
to be empty, or has no content.isEmpty in interface ObjectAssociationisEmpty in class ObjectAssociationAbstractpublic void set(ObjectAdapter ownerAdapter, ObjectAdapter newReferencedAdapter)
MutableCurrentHolderObjectAdapter for the owning
ObjectAdapter with the new value provided, or clears the
reference if null.
For example, if this is a OneToOneAssociation, then updates the
object referenced .
set in interface MutableCurrentHoldernewReferencedAdapter - - the new value, or null@Deprecated public void setAssociation(ObjectAdapter ownerAdapter, ObjectAdapter newReferencedAdapter)
OneToOneAssociationinitAssociation method
should be used on each of the objects.setAssociation in interface OneToOneAssociationset(ObjectAdapter, ObjectAdapter)@Deprecated public void clearAssociation(ObjectAdapter ownerAdapter)
OneToOneAssociationnull) in the specified
object, and remove any association back-link.clearAssociation in interface OneToOneAssociationset(ObjectAdapter, ObjectAdapter)public ObjectAdapter getDefault(ObjectAdapter ownerAdapter)
ObjectAssociationgetDefault in interface ObjectAssociationpublic void toDefault(ObjectAdapter ownerAdapter)
ObjectAssociationtoDefault in interface ObjectAssociationpublic boolean hasChoices()
ObjectAssociationhasChoices in interface ObjectAssociationhasChoices in class ObjectAssociationAbstractpublic ObjectAdapter[] getChoices(ObjectAdapter ownerAdapter)
ObjectAssociationgetChoices in interface ObjectAssociationpublic boolean hasAutoComplete()
ObjectAssociationhasAutoComplete in interface ObjectAssociationpublic ObjectAdapter[] getAutoComplete(ObjectAdapter ownerAdapter, String searchArg)
ObjectAssociationgetAutoComplete in interface ObjectAssociationpublic int getAutoCompleteMinLength()
getAutoCompleteMinLength in interface ObjectAssociationpublic Instance getInstance(ObjectAdapter ownerAdapter)
SpecificationInstance of this Specification with respect to
the provided ObjectAdapter.
For example, if the Specification is a
OneToOneAssociation, then is an Instance implementation
representing the { ObjectAdapter/ OneToOneAssociation
tuple.
Implementations are expected to use a double-dispatch back to the
provided ObjectAdapter (passing themselves as a parameter), using
ObjectAdapter.getInstance(Specification).
Note: this method may throw an UnsupportedOperationException; see
ObjectAdapter.getInstance(Specification) for details.
getInstance in interface Specificationpublic String debugData()
debugData in interface ObjectMemberpublic String toString()
toString in class ObjectMemberAbstractCopyright © 2010–2014 The Apache Software Foundation. All rights reserved.