org.teiid.translator.document.DocumentNode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of document-api Show documentation
Show all versions of document-api Show documentation
The java API for dealing with object types
package org.teiid.translator.document;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.teiid.language.Join.JoinType;
import org.teiid.metadata.Column;
import org.teiid.metadata.Table;
public class DocumentNode {
private Table table;
private boolean collection;
protected DocumentJoinNode joinNode;
public DocumentNode() {
}
public DocumentNode(Table t, boolean collection) {
this.table = t;
this.collection = collection;
}
public DocumentJoinNode joinWith(JoinType joinType, DocumentNode right) {
this.joinNode = new DocumentJoinNode(this, joinType, right);
return this.joinNode;
}
public Table getTable() {
return this.table;
}
public String getName() {
if (this.table.getNameInSource() != null) {
return this.table.getNameInSource();
}
return this.table.getName();
}
public boolean isCollection() {
return this.collection;
}
public List getIdentityColumns(){
if (this.table.getPrimaryKey() == null) {
return Collections.emptyList();
}
ArrayList keys = new ArrayList();
for (Column column:this.table.getPrimaryKey().getColumns()) {
keys.add(column.getName());
}
return keys;
}
public List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy