org.teiid.metadata.Table.equals()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(259)

本文整理了Java中org.teiid.metadata.Table.equals()方法的一些代码示例,展示了Table.equals()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.equals()方法的具体详情如下:
包路径:org.teiid.metadata.Table
类名称:Table
方法名:equals

Table.equals介绍

暂无

代码示例

代码示例来源:origin: org.teiid.connectors/translator-odata

  1. private Entity getEntity(Table table) {
  2. for (Entity e:this.entities) {
  3. if (e.table.equals(table)) {
  4. return e;
  5. }
  6. }
  7. return null;
  8. }

代码示例来源:origin: org.teiid.connectors/translator-salesforce

  1. public boolean isChildToParentJoin() {
  2. return childTable.equals(leftTableInJoin);
  3. }

代码示例来源:origin: org.teiid.connectors/translator-odata4

  1. ODataDocumentNode getSchemaElement(Table table) {
  2. if (this.rootDocument != null && this.rootDocument.getTable().equals(table)) {
  3. return this.rootDocument;
  4. }
  5. for (ODataDocumentNode schemaElement:this.complexTables) {
  6. if (schemaElement.getTable().equals(table)) {
  7. return schemaElement;
  8. }
  9. }
  10. for (ODataDocumentNode schemaElement:this.expandTables) {
  11. if (schemaElement.getTable().equals(table)) {
  12. return schemaElement;
  13. }
  14. }
  15. return null;
  16. }

代码示例来源:origin: org.teiid.connectors/translator-salesforce

  1. @Override
  2. void appendColumnReference(StringBuilder queryString, ColumnReference ref) {
  3. if (isChildToParentJoin() && this.rightTableInJoin.equals(ref.getMetadataObject().getParent())
  4. && this.parentName != null) {
  5. //TODO: a self join won't work with this logic
  6. queryString.append(parentName);
  7. queryString.append('.');
  8. queryString.append(ref.getMetadataObject().getSourceName());
  9. } else {
  10. super.appendColumnReference(queryString, ref);
  11. }
  12. }

代码示例来源:origin: org.teiid.connectors/translator-jpa

  1. private boolean isParentOf(NamedTable parent, NamedTable child) {
  2. String[] splits = child.getName().split("\\.");
  3. String correlation = splits[0];
  4. String attrName = splits[1];
  5. if (!parent.getCorrelationName().equals(correlation)) {
  6. return false;
  7. }
  8. for (ForeignKey fk:parent.getMetadataObject().getForeignKeys()){
  9. if (fk.getReferenceKey().getParent().equals(child.getMetadataObject())) {
  10. return true;
  11. }
  12. }
  13. return false;
  14. }

代码示例来源:origin: org.teiid.connectors/translator-odata4

  1. private void buildKeyColumns(Table parentTable, Table childTable,
  2. String columnName, Object value) {
  3. if(parentTable.equals(childTable)) {
  4. return;
  5. }
  6. for (ForeignKey fk:childTable.getForeignKeys()) {
  7. if (fk.getReferenceTableName().equals(parentTable.getName())) {
  8. List<Column> columns = fk.getColumns();
  9. for (int i = 0; i < columns.size(); i++) {
  10. Column fkColumn = columns.get(i);
  11. if (fkColumn.getName().equals(columnName)) {
  12. this.keys.put(fk.getReferenceColumns().get(i), value);
  13. }
  14. }
  15. }
  16. }
  17. if (!this.expandTables.isEmpty()) {
  18. if (childTable.getPrimaryKey() != null) {
  19. for (Column column:childTable.getPrimaryKey().getColumns()) {
  20. if (!isPseudo(column)) {
  21. if (column.getName().equals(columnName)) {
  22. this.expandKeys.put(columnName, value);
  23. }
  24. }
  25. }
  26. }
  27. }
  28. }

代码示例来源:origin: org.teiid/teiid-olingo

  1. static Criteria buildJoinCriteria(DocumentNode from, DocumentNode to) {
  2. for (ForeignKey fk:from.getTable().getForeignKeys()) {
  3. if (fk.getReferenceKey().getParent().equals(to.getTable())) {
  4. return buildCriteria(from, to, fk);
  5. }
  6. }
  7. return null;
  8. }

代码示例来源:origin: org.teiid.connectors/translator-jpa

  1. if (fk.getReferenceKey().getParent().equals(right.getMetadataObject())
  2. && (!isImplicit || attrName.equals(fk.getSourceName()))) {
  3. this.parent = left;
  4. if (fk.getReferenceKey().getParent().equals(left.getMetadataObject())) {
  5. this.parent = right;
  6. this.child = left;

代码示例来源:origin: org.teiid.connectors/translator-mongodb

  1. private void buildEmbeddableIntoReferences() {
  2. // if this table is marked as "embeddable", figure out all the tables it is
  3. // copied in.
  4. if (isEmbeddable()) {
  5. for (Table t:this.table.getParent().getTables().values()) {
  6. for (ForeignKey fk:t.getForeignKeys()) {
  7. if (fk.getReferenceKey().getParent().equals(this.table)){
  8. MergeDetails key = new MergeDetails(this);
  9. key.setName(this.table.getName());
  10. key.setParentTable(t.getName());
  11. key.setEmbeddedTable(this.table.getName());
  12. key.setColumns(MongoDBSelectVisitor.getColumnNames(fk.getColumns()));
  13. key.setReferenceColumns(fk.getReferenceColumns());
  14. key.setAssociation(Association.ONE);
  15. this.copyto.add(key);
  16. }
  17. }
  18. }
  19. }
  20. }

代码示例来源:origin: org.teiid.connectors/translator-mongodb

  1. if (fk.getReferenceKey().getParent().equals(mergeTable)) {
  2. MergeDetails key = new MergeDetails(this);
  3. key.setName(this.table.getName());
  4. if (fk1.getReferenceKey().getParent().equals(this.table)) {
  5. key.setAssociation(Association.ONE);
  6. break;

相关文章