@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof QualifiedAttributeID) { QualifiedAttributeID other = (QualifiedAttributeID)obj; return (this.attribute.equals(other.attribute) && ((this.relation == other.relation) || ((this.relation != null) && this.relation.equals(other.relation)))); } return false; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof QualifiedAttributeID) { QualifiedAttributeID other = (QualifiedAttributeID)obj; return (this.attribute.equals(other.attribute) && ((this.relation == other.relation) || ((this.relation != null) && this.relation.equals(other.relation)))); } return false; }
@Override public void visit(Column expression) { QuotedID column = idfac.createAttributeID(expression.getColumnName()); Table table = expression.getTable(); RelationID relation = (table != null) && (table.getName() != null) ? idfac.createRelationID(table.getSchemaName(), table.getName()) : null; QualifiedAttributeID qa = new QualifiedAttributeID(relation, column); Term var = attributes.get(qa); if (var == null) { // can be // - a CONSTANT or // - a PSEUDO-COLUMN like ROWID, ROWNUM or // - a FUNCTION without arguments like USER, CURRENT_DATE if (column.equals(idfac.createAttributeID("true"))) result = TERM_FACTORY.getBooleanConstant(true); else if (column.equals(idfac.createAttributeID("false"))) result = TERM_FACTORY.getBooleanConstant(false); else throw new UnsupportedSelectQueryRuntimeException("Unable to find attribute name ", expression); } else { // if it is an attribute name (qualified or not) result = var; } }
@Override public void visit(Column expression) { QuotedID column = idfac.createAttributeID(expression.getColumnName()); Table table = expression.getTable(); RelationID relation = (table != null) && (table.getName() != null) ? idfac.createRelationID(table.getSchemaName(), table.getName()) : null; QualifiedAttributeID qa = new QualifiedAttributeID(relation, column); Term var = attributes.get(qa); if (var == null) { // can be // - a CONSTANT or // - a PSEUDO-COLUMN like ROWID, ROWNUM or // - a FUNCTION without arguments like USER, CURRENT_DATE if (column.equals(idfac.createAttributeID("true"))) result = termFactory.getBooleanConstant(true); else if (column.equals(idfac.createAttributeID("false"))) result = termFactory.getBooleanConstant(false); else throw new UnsupportedSelectQueryRuntimeException("Unable to find attribute name ", expression); } else { // if it is an attribute name (qualified or not) result = var; } }
QuotedID columnId = column0.getAttribute(); for (Attribute a : relation.getAttributes()) { if (a.getID().equals(columnId)) { switch (a.getType()) { case Types.VARCHAR:
QuotedID columnId = column0.getAttribute(); for (Attribute a : relation.getAttributes()) { if (a.getID().equals(columnId)) { switch (a.getType()) { case Types.VARCHAR:
List<Attribute> attr = tabledef.getAttributes(); for (Attribute a : attr) { if (a.getID().equals(colId)) { switch (a.getType()) { case Types.VARCHAR: