Gets the keys.

@param m
the m
@param columns
the columns
@return the keys
492335
private BasicDBObject getKeys(EntityMetadata m, String[] columns)
    {
        BasicDBObject keys = new BasicDBObject();
        if (columns != null && columns.length > 0)
        {
            MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata()
                    .getMetamodel(m.getPersistenceUnit());
            EntityType entity = metaModel.entity(m.getEntityClazz());
            for (int i = 1; i < columns.length; i++)
            {
                if (columns[i] != null)
                {
                    Attribute col = entity.getAttribute(columns[i]);
                    if (col == null)
                    {
                        throw new QueryHandlerException("column type is null for: " + columns);
                    }
                    keys.put(((AbstractAttribute) col).getJPAColumnName(), 1);
                }
            }
        }
        return keys;
    }
28538
public Object[] valuesForColumns(T bo, String... columns) {
        Map<String, ColAttrMapping> columnAttributeMappings = getColumnAttributeMappings();
        Object[] result = new Object[columns.length];
        for (int i = 0; i < columns.length; i++) {
            ColAttrMapping colAttrMapping = columnAttributeMappings.get(columns[i]);
            try {
                result[i] = colAttrMapping != null ? colAttrMapping.extractAttrValue(bo) : null;
            } catch (Exception e) {
                throw e instanceof RuntimeException ? (RuntimeException) e
                        : new RuntimeException(e);
            }
        }
        return result;
    }
1347949
public Map<String, String> getMulti(String columnName, String... keys) {
    MultigetSliceQuery<String, String,String> q = createMultigetSliceQuery(keyspace, serializer, serializer, serializer);
    q.setColumnFamily(columnFamilyName);
    q.setKeys(keys);
    q.setColumnNames(columnName);

    QueryResult<Rows<String,String,String>> r = q.execute();
    Rows<String,String,String> rows = r.get();
    Map<String, String> ret = new HashMap<String, String>(keys.length);
    for (String k: keys) {
      HColumn<String, String> c = rows.getByKey(k).getColumnSlice().getColumnByName(columnName);
      if (c != null && c.getValue() != null) {
        ret.put(k, c.getValue());
      }
    }
    return ret;
  }
960954
protected List<ENTITY> findColumns(List<Match> matches, String[] columns) {

        Query query = queryGenerator.getMiniSelectQuery(Arrays.asList(columns), matches);
        return findBySQL(query.getSql(), query.getParams());
    }
891815
@MapMethod
    public List<Object> values(Map<String,Object> m){
        List<Object> l = Objects.newArrayList();
        for(Object k:m.values()){
            l.add(k);
        }
        return l;
    }
1030060
public Columns addAll(Columns columns) {
        for (Column column : columns) {
            this.columns.add(column);
        }
        return this;
    }
809797
def keys(cls):
        
        if cls._cache_keys is None:
            cls._cache_keys = [c.name for c in cls.__table__._columns]
        return cls._cache_keys
1333634
public ArrayList<String> getColumns() {
		ArrayList<String> columns = new ArrayList<String>();
		for (String col : columnLookup.keySet()) {
			HeaderInfo hi = columnLookup.get(col);
			if (!hi.isHide()) {
				columns.add(col);
			}
		}
		return columns;
	}
290297
public List<Map<String, Object>> toList(List<Object[]> table, String[] columns) {
		List<Map<String, Object>> resultList = new ArrayList<Map<String, Object>>();
		if ((table != null && columns != null) && table.size() > 0) {
			for (Object[] row : table) {
				Map<String, Object> result = new HashMap<String, Object>();
				for (int i = 0; i < columns.length; i++) {
					result.put(columns[i], row[i]);
				}
				resultList.add(result);
			}
		}
		return resultList;
	}
169851
@MapMethod
    public List<String> keys(Map<String,Object> m){
        List<String> l = Objects.newArrayList();
        for(String k:m.keySet()){
            l.add(k);
        }
        return l;
    }
609316
@SafeVarargs
  public final TableBuilder columns(String... columns) {
    if (columns == null || columns.length == 0) {
      throw new InvalidOperationException("Columns array is null or empty.");
    }
    if (tableColumns != null) {
      throw new InvalidOperationException("The table columns are already defined.");
    }
    tableColumns = columns.clone();
    return this;
  }
1260814
@SuppressWarnings("unchecked")
	public Map<String, Object> getColumns() {
		if (columns == null) {
			if (DbKit.config == null)
				columns = DbKit.brokenConfig.containerFactory.getColumnsMap();
			else
				columns = DbKit.config.containerFactory.getColumnsMap();
		}
		return columns;
	}
1186995
final Set<String> getPrimaryColumnNames() {
		final List<DBColumn> primaryKeyColumnList = getPrimaryKeyColumnList();
		final Set<String> primaryKeyColumnNameSet = new LinkedHashSet<String>();
		for (DBColumn col : primaryKeyColumnList) {

			primaryKeyColumnNameSet.add(col.columnName());
		}
		return primaryKeyColumnNameSet;
	}
153352
def take_column(self, keys, *extra_keys):
        
        import utool as ut
        keys = ut.ensure_iterable(keys) + list(extra_keys)
        key_to_list = ut.dict_subset(self._key_to_list, keys)
        newself = self.__class__(key_to_list, self._meta.copy())
        return newself
127471
public final String[] keys()
  {
    String [] keysArr = new String[m_firstFree];

    for (int i = 0; i < m_firstFree; i++)
    {
      keysArr[i] = m_map[i];
    }

    return keysArr;
  }
457659
def keys(self):
    """"""
    columns = set()
    for name in vars(self):
      if (not name) or name[0] == "_":
        continue
      columns.add(name)
    return columns
27304
public static Column[] toColumns(String... columns) {
        Column[] ret = new Column[columns.length];
        for (int i = 0; i < columns.length; i++)
            ret[i] = col(columns[i]);
        return ret;
    }