<Y, X> void copyAttributeValues(Query<Y> query, X to, X map) { for (FieldDefinition def : fields) { Object obj = def.getValue(map); SelectColumn<Y> col = query.getSelectColumn(obj); Object value = col.getCurrentValue(); def.setValue(to, value); } }
/** * INTERNAL * * @param stat the statement * @param x the alias object */ public void appendSQL(SQLStatement stat, Object x) { if (x == Function.count()) { stat.appendSQL("COUNT(*)"); return; } Token token = Db.getToken(x); if (token != null) { token.appendSQL(stat, this); return; } SelectColumn<T> col = aliasMap.get(x); if (col != null) { col.appendSQL(stat); return; } stat.appendSQL("?"); stat.addParameter(x); }