Class WsDefinitionObjectReferencePersistenceContributor

    • Constructor Detail

      • WsDefinitionObjectReferencePersistenceContributor

        public WsDefinitionObjectReferencePersistenceContributor()
    • Method Detail

      • createReferenceValue

        public Object createReferenceValue​(org.eclipse.emf.ecore.EObject target,
                                           IBmNamespace contextNs)
        Description copied from interface: IBmReferencePersistenceContributor
        Creates internal representation of reference value.
        Specified by:
        createReferenceValue in interface IBmReferencePersistenceContributor
        Parameters:
        target - The object (may be a proxy) the reference points to (reference target). May not be null.
        contextNs - The context namespace, i.e. the namespace the referencing object belongs to. May not be null.
        Returns:
        the internal representation of the reference value or null if the target object is not supported by this contributor or reference to the target object may not be created. The class of the returned object must implement equals method so that it returns true in case either reference value points to the same target.
      • resolveTarget

        public org.eclipse.emf.ecore.EObject resolveTarget​(Object value,
                                                           IBmNamespace contextNs,
                                                           IBmPlatformTransaction transaction)
        Description copied from interface: IBmReferencePersistenceContributor
        Resolves target object pointed by the specified reference value. In case the provided value has not been created by this contributor the behaviour of this method is not specified.
        Specified by:
        resolveTarget in interface IBmReferencePersistenceContributor
        Parameters:
        value - The reference value. May not be null.
        contextNs - The context namespace, i.e. the namespace the referencing object belongs to. May not be null.
        transaction - The current transaction. May not be null.
        Returns:
        the target object or null if it does not exist.
      • resolveTargetUri

        public org.eclipse.emf.common.util.URI resolveTargetUri​(Object value,
                                                                IBmNamespace contextNs)
        Description copied from interface: IBmReferencePersistenceContributor
        Resolves URI of the target object pointed by the specified reference value. In case the provided value has not been created by this contributor the behaviour of this method is not specified.
        Specified by:
        resolveTargetUri in interface IBmReferencePersistenceContributor
        Parameters:
        value - The reference value. May not be null.
        contextNs - The context namespace, i.e. the namespace the referencing object belongs to. May not be null.
        Returns:
        the URI of the target object, never null.
      • getId

        public String getId()
        Description copied from interface: IBmReferencePersistenceContributor
        Gets ID of the contributor. The ID must not change after the application restart. It is convenient to use the class name of the contributor as the ID unless several instances of the same contributor class are bound to the same engine.
        Specified by:
        getId in interface IBmReferencePersistenceContributor
        Returns:
        the ID of the contributor.