XMLColumnpublic class XMLColumn extends MetadataColumn Object to hold onto an xml column metadata in a TopLink database field. |
Constructors Summary |
---|
public XMLColumn(Node node, XMLHelper helper, AnnotatedElement annotatedElement)INTERNAL:
Called for attribute overrides from a class accessor or embedded
accessor. If there is no column node, the database field values will
default.
super(helper.getNodeValue(node, XMLConstants.ATT_NAME), annotatedElement);
processColumnNode(helper.getNode(node, XMLConstants.COLUMN), helper);
| public XMLColumn(Node node, XMLHelper helper, XMLBasicAccessor accessor)INTERNAL:
Called for basic accessors. If there is no column node, the database
field values will default.
super(accessor.getAttributeName(), accessor.getAnnotatedElement());
processColumnNode(node, helper);
|
Methods Summary |
---|
public boolean | loadedFromXML()INTERNAL:
return true;
| protected void | processColumnNode(org.w3c.dom.Node node, oracle.toplink.essentials.internal.ejb.cmp3.xml.XMLHelper helper)INTERNAL:
if (node != null) {
// Process the name attribute node.
m_databaseField.setName(helper.getNodeValue(node, XMLConstants.ATT_NAME, DEFAULT_NAME));
// Process the table attribute node.
m_databaseField.setTableName(helper.getNodeValue(node, XMLConstants.ATT_TABLE, DEFAULT_TABLE));
// Process the insertable attribute node.
m_databaseField.setInsertable(helper.getNodeValue(node, XMLConstants.ATT_INSERTABLE, DEFAULT_INSERTABLE));
// Process the updatable attribute node.
m_databaseField.setUpdatable(helper.getNodeValue(node, XMLConstants.ATT_UPDATABLE, DEFAULT_UPDATABLE));
// Process the unique attribute node.
m_databaseField.setUnique(helper.getNodeValue(node, XMLConstants.ATT_UNIQUE, DEFAULT_UNIQUE));
// Process the nullable attribute node.
m_databaseField.setNullable(helper.getNodeValue(node, XMLConstants.ATT_NULLABLE, DEFAULT_NULLABLE));
// Process the column-definition attribute node.
m_databaseField.setColumnDefinition(helper.getNodeValue(node, XMLConstants.ATT_COLUMN_DEFINITION, DEFAULT_COLUMN_DEFINITION));
// Process the length attribute node.
m_databaseField.setLength(helper.getNodeValue(node, XMLConstants.ATT_LENGTH, DEFAULT_LENGTH));
// Process the precision attribute node.
m_databaseField.setPrecision(helper.getNodeValue(node, XMLConstants.ATT_PRECISION, DEFAULT_PRECISION));
// Process the scale attribute node.
m_databaseField.setScale(helper.getNodeValue(node, XMLConstants.ATT_SCALE, DEFAULT_SCALE));
}
|
|