Class QlMapper


  • public class QlMapper
    extends Mapper
    The mapper for the Ql language. Use as mapping between DbView and QuerySchema elements One source (QuerySchema elements) corresponding a lot of DbView objects
    • Nested Class Summary

    • Constructor Summary

      Constructors 
      Constructor Description
      QlMapper()  
    • Constructor Detail

      • QlMapper

        public QlMapper()
    • Method Detail

      • getDerivedObjects

        public Set<org.eclipse.emf.ecore.EObject> getDerivedObjects​(org.eclipse.emf.ecore.EObject eObject)
        Returns the set of derived objects for the given object.
        Parameters:
        eObject - not null
        Returns:
        the set of derived objects (never null)
        See Also:
        associate(EObject, EObject)
      • getSourceObjects

        public Set<org.eclipse.emf.ecore.EObject> getSourceObjects​(org.eclipse.emf.ecore.EObject eObject)
        Returns the set of source objects for the given object.
        Parameters:
        eObject - not null
        Returns:
        the set of source objects (never null)
        See Also:
        associate(EObject, EObject)
      • associate

        public void associate​(org.eclipse.emf.ecore.EObject sourceObject,
                              org.eclipse.emf.ecore.EObject derivedObject)
        Associates the given source object with the given derived object. Note that the created association is bidirectional. This is a shortcut to associate(sourceObject, derivedObject, true).
        Parameters:
        sourceObject - not null
        derivedObject - not null
      • associate

        public void associate​(org.eclipse.emf.ecore.EObject sourceObject,
                              org.eclipse.emf.ecore.EObject derivedObject,
                              boolean bidirectional)
        Creates a mapping from the given derived object to the given source object. If bidirectional association is requested, also creates the inverse mapping from the source object to the derived object.
        Parameters:
        sourceObject - not null
        derivedObject - not null
        bidirectional - whether association is to be bidirectional
      • unsetMapping

        public void unsetMapping​(org.eclipse.emf.ecore.EObject eObject)
        Disassociates the given object with the mapped objects previously associated with it.
        Parameters:
        eObject - not null
      • unsetMappingForContentTree

        public void unsetMappingForContentTree​(org.eclipse.emf.ecore.EObject root)
        Disassociates the given object and all its direct and indirect contents (i.e. the content tree) with the mapped objects previously associated with them.
        Parameters:
        root - the root of a content tree (not null)
      • newMapping

        protected <T extends Mapper.Mapping> T newMapping​(Class<T> mappingType)
        Description copied from class: Mapper
        Returns a new mapping object of the given type.
        Specified by:
        newMapping in class Mapper
        Parameters:
        mappingType - the type of the mapping (not null)
        Returns:
        a new mapping object of the given type (never null)