static String[] columns(Constraint c, ObjectMap map, String alias) { return names(cols(c, map), alias);
static String[] columns(Mapping m, final String alias) { if (m.getRetrieve() != null) { return columns(m.getMap(), alias); }  if (isStaticAttribute(m)) { ObjectMap map = m.getObjectMap(); SQLBlock block = map.getRetrieveAll(); if (block == null && m instanceof Static) { throw new MetadataException (map.getRoot(), map, "Specify metadata for property " + m.getPath() + " in type " + m.getObjectMap().getObjectType() .getQualifiedName() + " or include a retrieve all for the type"); } return columns(paths(m.getMap().getObjectType(), m.getPath()), block); }  final String[][] result = new String[][] { null };  m.dispatch(new Mapping.Switch() { public void onValue(Value v) { result[0] = names(new Column[] {v.getColumn()}, alias); } public void onJoinTo(JoinTo j) { result[0] = columns(j.getKey(), j.getMap(), alias); } public void onJoinFrom(JoinFrom j) { result[0] = columns (j.getKey().getTable().getPrimaryKey(), j.getMap(), alias); } public void onJoinThrough(JoinThrough jt) { result[0] = columns(jt.getTo(), jt.getMap(), alias); } public void onStatic(Static s) { throw new IllegalStateException(); } public void onNested(Nested n) { throw new Error("nested map"); } });  return result[0];
    static String[] columns(Constraint c, ObjectMap map, String alias) {        return names(cols(c, map), alias);    }