Class BindingMappingDetail


  • public class BindingMappingDetail
    extends java.lang.Object
    Holder for the details of how a class is going to be mapped. This information is needed in order to determine how to reference the mapped class when it's used within another mapping definition.
    Author:
    Dennis M. Sosnoski
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private MappingElement m_abstractMapping
      Abstract mapping definition (null if none).
      private MappingElementBase m_concreteMapping
      Concrete mapping definition (null if none).
      private QName m_elementQName
      Concrete mapping element name (null if none).
      private java.lang.String m_extendsType
      Concrete mapping type extended by this one.
      private boolean m_isExtended
      Flag for class extended by other mapped class(es).
      private boolean m_isGenerated
      Flag for mapping(s) has been generated.
      private java.util.Map m_propertyMethodMap
      Map from access method name to property customization information for properties covered by this mapping (including inherited ones).
      private java.lang.String m_type
      Fully-qualified class name of mapped class.
      private QName m_typeQName
      Abstract mapping type name (null if none).
      private boolean m_useAbstract
      Generate abstract mapping flag.
      private boolean m_useConcrete
      Generate concrete mapping flag.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected BindingMappingDetail​(java.lang.String type, QName aname, QName cname, java.lang.String stype)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      MappingElement getAbstractMapping()
      Get the abstract <mapping> for the target class.
      java.util.Map getAccessMethodMap()
      Get map from access method name to property customization information for properties covered by this <mapping>.
      MappingElementBase getConcreteMapping()
      Get the concrete <mapping> for the target class.
      QName getElementQName()
      Get the element name used for a concrete mapping.
      java.lang.String getExtendsType()
      Get the fully-qualified class name of the type extended by this <mapping>.
      java.lang.String getType()
      Get fully-qualified name of mapped class.
      QName getTypeQName()
      Get the type name used for an abstract mapping.
      boolean isExtended()
      Check for target class extended by other mapped class(es).
      boolean isGenerated()
      Check if this <mapping> has been generated.
      boolean isUseAbstract()
      Check if an abstract <mapping> used for this class.
      boolean isUseConcrete()
      Check if a concrete <mapping> used for this class.
      void setAbstractMapping​(MappingElement abs)
      Set the abstract <mapping> for the target class.
      void setAccessMethodMap​(java.util.Map map)
      Set map from access method name to property customization information for properties covered by this <mapping>.
      void setConcreteMapping​(MappingElementBase con)
      Set the concrete <mapping> for the target class.
      void setElementQName​(QName qname)
      Set the element name used for a concrete mapping.
      void setExtended​(boolean ext)
      Set target class extended by other mapped class(es).
      void setGenerated​(boolean gen)
      Set flag for <mapping> generated.
      void setUseAbstract​(boolean abs)
      Set flag for abstract <mapping> used for this class.
      void setUseConcrete​(boolean con)
      Set flag for concrete <mapping> used for this class.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • m_type

        private final java.lang.String m_type
        Fully-qualified class name of mapped class.
      • m_useAbstract

        private boolean m_useAbstract
        Generate abstract mapping flag.
      • m_useConcrete

        private boolean m_useConcrete
        Generate concrete mapping flag.
      • m_isExtended

        private boolean m_isExtended
        Flag for class extended by other mapped class(es).
      • m_typeQName

        private final QName m_typeQName
        Abstract mapping type name (null if none).
      • m_elementQName

        private QName m_elementQName
        Concrete mapping element name (null if none).
      • m_extendsType

        private java.lang.String m_extendsType
        Concrete mapping type extended by this one.
      • m_propertyMethodMap

        private java.util.Map m_propertyMethodMap
        Map from access method name to property customization information for properties covered by this mapping (including inherited ones).
      • m_isGenerated

        private boolean m_isGenerated
        Flag for mapping(s) has been generated.
      • m_abstractMapping

        private MappingElement m_abstractMapping
        Abstract mapping definition (null if none).
      • m_concreteMapping

        private MappingElementBase m_concreteMapping
        Concrete mapping definition (null if none).
    • Constructor Detail

      • BindingMappingDetail

        protected BindingMappingDetail​(java.lang.String type,
                                       QName aname,
                                       QName cname,
                                       java.lang.String stype)
        Constructor.
        Parameters:
        type - fully-qualified mapped class name
        aname - abstract mapping type name
        cname - concrete mapping element name
        stype - superclass for extension (null if not an extension mapping)
    • Method Detail

      • getType

        public java.lang.String getType()
        Get fully-qualified name of mapped class.
        Returns:
        class name
      • getAbstractMapping

        public MappingElement getAbstractMapping()
        Get the abstract <mapping> for the target class.
        Returns:
        abstract , null if none
      • setAbstractMapping

        public void setAbstractMapping​(MappingElement abs)
        Set the abstract <mapping> for the target class.
        Parameters:
        abs - abstract , null if none
      • getConcreteMapping

        public MappingElementBase getConcreteMapping()
        Get the concrete <mapping> for the target class.
        Returns:
        concrete , null if none
      • setConcreteMapping

        public void setConcreteMapping​(MappingElementBase con)
        Set the concrete <mapping> for the target class.
        Parameters:
        con - concrete , null if none
      • isExtended

        public boolean isExtended()
        Check for target class extended by other mapped class(es).
        Returns:
        true if extended, false if not
      • setExtended

        public void setExtended​(boolean ext)
        Set target class extended by other mapped class(es). Setting this true forces a concrete <mapping> to be used.
        Parameters:
        ext -
      • isGenerated

        public boolean isGenerated()
        Check if this <mapping> has been generated.
        Returns:
        true if generated, false if not
      • setGenerated

        public void setGenerated​(boolean gen)
        Set flag for <mapping> generated.
        Parameters:
        gen -
      • isUseAbstract

        public boolean isUseAbstract()
        Check if an abstract <mapping> used for this class.
        Returns:
        true if abstract mapping used, false if not
      • setUseAbstract

        public void setUseAbstract​(boolean abs)
        Set flag for abstract <mapping> used for this class.
        Parameters:
        abs - true if abstract mapping used, false if not
      • isUseConcrete

        public boolean isUseConcrete()
        Check if a concrete <mapping> used for this class.
        Returns:
        true if concrete mapping used, false if not
      • setUseConcrete

        public void setUseConcrete​(boolean con)
        Set flag for concrete <mapping> used for this class.
        Parameters:
        con - true if concrete mapping used, false if not
      • getElementQName

        public QName getElementQName()
        Get the element name used for a concrete mapping. Note that this method will always return a non-null result if a concrete mapping is being used, but may also return a non-null result even if there is no concrete mapping - so check first using the isUseConcrete() method.
        Returns:
        element name, or null if not defined
      • setElementQName

        public void setElementQName​(QName qname)
        Set the element name used for a concrete mapping.
        Parameters:
        qname - element name, or null if not defined
      • getExtendsType

        public java.lang.String getExtendsType()
        Get the fully-qualified class name of the type extended by this <mapping>.
        Returns:
        class name, or null if none
      • getTypeQName

        public QName getTypeQName()
        Get the type name used for an abstract mapping. Note that this method will always return a non-null result if an abstract mapping is being used, but may also return a non-null result even if there is no abstract mapping - so check first using the isUseConcrete() method.
        Returns:
        type name, or null if not defined
      • getAccessMethodMap

        public java.util.Map getAccessMethodMap()
        Get map from access method name to property customization information for properties covered by this <mapping>. This map includes both properties defined directly, and those inherited from any base mapping.
        Returns:
        map (non-null after <mapping> constructed)
      • setAccessMethodMap

        public void setAccessMethodMap​(java.util.Map map)
        Set map from access method name to property customization information for properties covered by this <mapping>. This must be done at the time the <mapping> is constructed.
        Parameters:
        map - (non-null, use empty map if not applicable)