/** get the {@link XMLColumn} by the given name. */ public XMLColumn get(String name) { initInnerList(); for (XMLColumn one : getList()) { if (one.getName().equals(name)) { return one; } } return null; }
/** @param columns */ public void setColumns(List<XMLColumn> columns) { if (getTeiidVersion().isGreaterThanOrEqualTo(Version.TEIID_8_0.get()) && columns.isEmpty()) { usingDefaultColumn = true; XMLColumn xmlColumn = parser.createASTNode(ASTNodes.XML_COLUMN); xmlColumn.setName("OBJECT_VALUE"); // $NON-NLS-1$ xmlColumn.setType(DataTypeManagerService.DefaultDataTypes.XML.getId()); xmlColumn.setPath("."); // $NON-NLS-1$ columns.add(xmlColumn); } this.columns = columns; }
/** * @param node * @param xmlTable */ public XMLColumns(Node currentNode, XMLTable xmlTable) { this.superTable = xmlTable; XMLColumn column = null; List<Node> nodeList = getNodes(O_COLUMN, currentNode); if (ListUtil.isNotEmpty(nodeList)) { for (Node node : nodeList) { column = new XMLColumn(node, this); add(column); IdCollector.put(column.getId(), column); } log.debug(INITIALLIZED_NAME, "XMLColumns"); } }