public class XMLClassMetaData extends Object implements XMLMetaData
ATTRIBUTE, defaultName, ELEMENT, XMLTYPE
Constructor and Description |
---|
XMLClassMetaData(Class type)
Constructor.
|
XMLClassMetaData(Class type,
String name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addField(String name,
XMLMetaData field) |
XMLMetaData |
getFieldMapping(String name)
Return XMLMapping for a given field.
|
String |
getName()
Return the mapping name.
|
Class |
getType()
Return type.
|
int |
getTypeCode()
Return type code.
|
String |
getXmlname()
Return xml element tag name or xml attribute name.
|
String |
getXmlnamespace()
Return xml namespace.
|
int |
getXmltype()
Return xmltype
|
boolean |
isXmlAttribute()
Return true if mapping on an XmlAttribute.
|
boolean |
isXmlElement()
Return true if mapping on an XmlElement.
|
boolean |
isXmlRootElement()
Return true if mapping on an XmlRootElement.
|
void |
setName(String name)
Set field name.
|
void |
setType(Class type)
Set type.
|
void |
setXmlname(String name)
Set xml element or attribute name.
|
void |
setXmlnamespace(String name)
Set namespace.
|
void |
setXmlRootElement(boolean isXMLRootElement) |
void |
setXmltype(int type)
Set xmltype
|
public XMLClassMetaData(Class type, String name)
type
- the class that contains XmlType annotation.name
- the persistent field name that maps to xml columnpublic XMLClassMetaData(Class type)
type
- the class that contains XmlType annotation.public void setName(String name)
XMLMetaData
setName
in interface XMLMetaData
name
- the field name.public String getName()
XMLMetaData
getName
in interface XMLMetaData
public void setXmlname(String name)
XMLMetaData
setXmlname
in interface XMLMetaData
name
- the element name or attribute namepublic String getXmlname()
XMLMetaData
getXmlname
in interface XMLMetaData
public void setXmlnamespace(String name)
XMLMetaData
setXmlnamespace
in interface XMLMetaData
public String getXmlnamespace()
XMLMetaData
getXmlnamespace
in interface XMLMetaData
public void setXmlRootElement(boolean isXMLRootElement)
setXmlRootElement
in interface XMLMetaData
public boolean isXmlRootElement()
XMLMetaData
isXmlRootElement
in interface XMLMetaData
public boolean isXmlElement()
XMLMetaData
isXmlElement
in interface XMLMetaData
public boolean isXmlAttribute()
XMLMetaData
isXmlAttribute
in interface XMLMetaData
public XMLMetaData getFieldMapping(String name)
XMLMetaData
getFieldMapping
in interface XMLMetaData
name
- the field name.public void setType(Class type)
XMLMetaData
setType
in interface XMLMetaData
public Class getType()
XMLMetaData
getType
in interface XMLMetaData
public int getTypeCode()
XMLMetaData
getTypeCode
in interface XMLMetaData
public void setXmltype(int type)
XMLMetaData
setXmltype
in interface XMLMetaData
type
- XMLTYPE, ELEMENT, or ATTRIBUTEpublic int getXmltype()
XMLMetaData
getXmltype
in interface XMLMetaData
public void addField(String name, XMLMetaData field)
addField
in interface XMLMetaData
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.