{
Collection<IColumn> columns = null;
if (superColumnKey_ != null)
{
// this is the super column case
IColumn column = cfamily.getColumn(superColumnKey);
if (column != null)
columns = column.getSubColumns();
}
else
{
columns = cfamily.getAllColumns();
}
if (columns != null && columns.size() > 0)
{
if (columns.size() > 1)
{
// We are looking up by a rowKey & columnKey. There should
// be at most one column that matches. If we find more than
// one, then it is an internal error.
throw new RuntimeException(RuntimeErrorMsg.INTERNAL_ERROR.getMsg("Too many columns found for: " + columnKey));
}
for (IColumn column : columns)
{
List<Map<String, String>> rows = new LinkedList<Map<String, String>>();
Map<String, String> result = new HashMap<String, String>();
result.put(cfMetaData_.n_columnKey, column.name());
result.put(cfMetaData_.n_columnValue, new String(column.value()));
result.put(cfMetaData_.n_columnTimestamp, Long.toString(column.timestamp()));
rows.add(result);
// at this point, due to the prior checks, we are guaranteed that
// there is only one item in "columns".