Package org.jibx.binding.generator
Class BindingMappingDetail
- java.lang.Object
-
- org.jibx.binding.generator.BindingMappingDetail
-
public class BindingMappingDetail extends java.lang.ObjectHolder 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 MappingElementm_abstractMappingAbstract mapping definition (nullif none).private MappingElementBasem_concreteMappingConcrete mapping definition (nullif none).private QNamem_elementQNameConcrete mapping element name (nullif none).private java.lang.Stringm_extendsTypeConcrete mapping type extended by this one.private booleanm_isExtendedFlag for class extended by other mapped class(es).private booleanm_isGeneratedFlag for mapping(s) has been generated.private java.util.Mapm_propertyMethodMapMap from access method name to property customization information for properties covered by this mapping (including inherited ones).private java.lang.Stringm_typeFully-qualified class name of mapped class.private QNamem_typeQNameAbstract mapping type name (nullif none).private booleanm_useAbstractGenerate abstract mapping flag.private booleanm_useConcreteGenerate concrete mapping flag.
-
Constructor Summary
Constructors Modifier Constructor Description protectedBindingMappingDetail(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 MappingElementgetAbstractMapping()Get the abstract <mapping> for the target class.java.util.MapgetAccessMethodMap()Get map from access method name to property customization information for properties covered by this <mapping>.MappingElementBasegetConcreteMapping()Get the concrete <mapping> for the target class.QNamegetElementQName()Get the element name used for a concrete mapping.java.lang.StringgetExtendsType()Get the fully-qualified class name of the type extended by this <mapping>.java.lang.StringgetType()Get fully-qualified name of mapped class.QNamegetTypeQName()Get the type name used for an abstract mapping.booleanisExtended()Check for target class extended by other mapped class(es).booleanisGenerated()Check if this <mapping> has been generated.booleanisUseAbstract()Check if an abstract <mapping> used for this class.booleanisUseConcrete()Check if a concrete <mapping> used for this class.voidsetAbstractMapping(MappingElement abs)Set the abstract <mapping> for the target class.voidsetAccessMethodMap(java.util.Map map)Set map from access method name to property customization information for properties covered by this <mapping>.voidsetConcreteMapping(MappingElementBase con)Set the concrete <mapping> for the target class.voidsetElementQName(QName qname)Set the element name used for a concrete mapping.voidsetExtended(boolean ext)Set target class extended by other mapped class(es).voidsetGenerated(boolean gen)Set flag for <mapping> generated.voidsetUseAbstract(boolean abs)Set flag for abstract <mapping> used for this class.voidsetUseConcrete(boolean con)Set flag for concrete <mapping> used for this class.
-
-
-
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 (nullif none).
-
m_elementQName
private QName m_elementQName
Concrete mapping element name (nullif 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 (nullif none).
-
m_concreteMapping
private MappingElementBase m_concreteMapping
Concrete mapping definition (nullif 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 nameaname- abstract mapping type namecname- concrete mapping element namestype- superclass for extension (nullif 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
, nullif none
-
setAbstractMapping
public void setAbstractMapping(MappingElement abs)
Set the abstract <mapping> for the target class.- Parameters:
abs- abstract, nullif none
-
getConcreteMapping
public MappingElementBase getConcreteMapping()
Get the concrete <mapping> for the target class.- Returns:
- concrete
, nullif none
-
setConcreteMapping
public void setConcreteMapping(MappingElementBase con)
Set the concrete <mapping> for the target class.- Parameters:
con- concrete, nullif none
-
isExtended
public boolean isExtended()
Check for target class extended by other mapped class(es).- Returns:
trueif extended,falseif not
-
setExtended
public void setExtended(boolean ext)
Set target class extended by other mapped class(es). Setting thistrueforces a concrete <mapping> to be used.- Parameters:
ext-
-
isGenerated
public boolean isGenerated()
Check if this <mapping> has been generated.- Returns:
trueif generated,falseif 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:
trueif abstract mapping used,falseif not
-
setUseAbstract
public void setUseAbstract(boolean abs)
Set flag for abstract <mapping> used for this class.- Parameters:
abs-trueif abstract mapping used,falseif not
-
isUseConcrete
public boolean isUseConcrete()
Check if a concrete <mapping> used for this class.- Returns:
trueif concrete mapping used,falseif not
-
setUseConcrete
public void setUseConcrete(boolean con)
Set flag for concrete <mapping> used for this class.- Parameters:
con-trueif concrete mapping used,falseif not
-
getElementQName
public QName getElementQName()
Get the element name used for a concrete mapping. Note that this method will always return a non-nullresult if a concrete mapping is being used, but may also return a non-nullresult even if there is no concrete mapping - so check first using theisUseConcrete()method.- Returns:
- element name, or
nullif not defined
-
setElementQName
public void setElementQName(QName qname)
Set the element name used for a concrete mapping.- Parameters:
qname- element name, ornullif 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
nullif none
-
getTypeQName
public QName getTypeQName()
Get the type name used for an abstract mapping. Note that this method will always return a non-nullresult if an abstract mapping is being used, but may also return a non-nullresult even if there is no abstract mapping - so check first using theisUseConcrete()method.- Returns:
- type name, or
nullif 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-
nullafter <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)
-
-