defineColumn(je.getTo().getColumnName()); query.addCondition(new Condition(from, to));
defineColumn(je.getTo());  if (to.equals(from)) { Set sources = from.getSources(); StringBuffer msg = new StringBuffer( "Duplicate columns: " ); for (Iterator iter = sources.iterator(); iter.hasNext(); ) { com.arsdigita.persistence.metadata.Column col = (com.arsdigita.persistence.metadata.Column) iter.next(); msg.append(col.getFilename() + ": " + col.getLineNumber() + " column " + col.getColumnNumber());  if (iter.hasNext()) { msg.append(", "); } } throw new Error(msg.toString()); }  if (to.getTable().getEntering().size() > 0) { query.addCondition(new Condition(to, from)); } else { query.addCondition(new Condition(from, to)); }
    void buildQuery() {        Query query = getQuery();        Set elements = getJoinElements();        for (Iterator it = elements.iterator(); it.hasNext(); ) {            JoinElement je = (JoinElement) it.next();            Column from = defineTable(je.getFrom().getTableName()).                         defineColumn(je.getFrom().getColumnName());            Column to   = defineTable(je.getTo().getTableName()).                         defineColumn(je.getTo().getColumnName());            query.addCondition(new Condition(from, to));        }        for (Iterator it = getSelections().iterator(); it.hasNext(); ) {            Selection sel = (Selection) it.next();            Property prop = sel.getProperty();            Table table = defineTable(prop.getColumn().getTableName());            sel.setColumn(                table.defineColumn(prop.getColumn().getColumnName())                );        }    }