Class BindingMappingDetail

java.lang.Object
org.jibx.binding.generator.BindingMappingDetail

public class BindingMappingDetail extends 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 Details

    • m_type

      private final 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 String m_extendsType
      Concrete mapping type extended by this one.
    • m_propertyMethodMap

      private 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 Details

    • BindingMappingDetail

      protected BindingMappingDetail(String type, QName aname, QName cname, 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 Details

    • getType

      public 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 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 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(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)