/** * INTERNAL: * much like getOwnedTables(), this gets the tables represented from the descriptor. Difference is this only returns local tables * for the child casted descriptor, and excludes tables owned by the parent descriptor */ public List<DatabaseTable> getOwnedSubTables() { ClassDescriptor parentDescriptor = this.typeExpressionBase.getDescriptor(); Vector<DatabaseTable> childTables = new Vector(2); if (parentDescriptor.hasInheritance() && parentDescriptor.getInheritancePolicy().hasMultipleTableChild() ) { List parentTables = typeExpressionBase.getOwnedTables(); //All tables for this child, including parent tables Vector<DatabaseTable> tables = getDescriptor().getTables(); for (DatabaseTable table : tables) { if (!parentTables.contains(table)) { childTables.add(table); } } } return childTables; }
/** * INTERNAL: * much like getOwnedTables(), this gets the tables represented from the descriptor. Difference is this only returns local tables * for the child casted descriptor, and excludes tables owned by the parent descriptor */ public List<DatabaseTable> getOwnedSubTables() { ClassDescriptor parentDescriptor = this.typeExpressionBase.getDescriptor(); Vector<DatabaseTable> childTables = new Vector(2); if (parentDescriptor.hasInheritance() && parentDescriptor.getInheritancePolicy().hasMultipleTableChild() ) { List parentTables = typeExpressionBase.getOwnedTables(); //All tables for this child, including parent tables Vector<DatabaseTable> tables = getDescriptor().getTables(); for (DatabaseTable table : tables) { if (!parentTables.contains(table)) { childTables.add(table); } } } return childTables; }
/** * INTERNAL: */ public Vector getOwnedTables() { if ((getMapping() != null) && getMapping().isNestedTableMapping()) { Vector nestedTable = null; if (shouldQueryToManyRelationship()) { nestedTable = (Vector)super.getOwnedTables().clone(); } else { nestedTable = new Vector(1); } nestedTable.addElement(new NestedTable(this)); return nestedTable; } if ((getMapping() != null) && (getMapping().isReferenceMapping() || getMapping().isStructureMapping())) { return null; } return super.getOwnedTables(); }
/** * INTERNAL: */ @Override public List<DatabaseTable> getOwnedTables() { if ((getMapping() != null) && getMapping().isNestedTableMapping()) { List<DatabaseTable> nestedTable = null; if (shouldQueryToManyRelationship()) { nestedTable = new ArrayList(super.getOwnedTables()); } else { nestedTable = new ArrayList(1); } nestedTable.add(new NestedTable(this)); return nestedTable; } if ((getMapping() != null) && (getMapping().isReferenceMapping() || getMapping().isStructureMapping())) { return null; } return super.getOwnedTables(); }
/** * INTERNAL: */ @Override public List<DatabaseTable> getOwnedTables() { if ((getMapping() != null) && getMapping().isNestedTableMapping()) { List<DatabaseTable> nestedTable = null; if (shouldQueryToManyRelationship()) { nestedTable = new ArrayList(super.getOwnedTables()); } else { nestedTable = new ArrayList(1); } nestedTable.add(new NestedTable(this)); return nestedTable; } if ((getMapping() != null) && (getMapping().isReferenceMapping() || getMapping().isStructureMapping())) { return null; } return super.getOwnedTables(); }