Gets the column value.

@param result
the result
@param jpaColumnName
the jpa column name
@return the column value
507932
public static Object getColumnValue(RowResult result, String jpaColumnName)
    {

        if (result.isNull(jpaColumnName))
        {
            return null;
        }

        switch (result.getColumnType(jpaColumnName))
        {
        case BINARY:
            return result.getBinary(jpaColumnName);
        case BOOL:
            return result.getBoolean(jpaColumnName);
        case DOUBLE:
            return result.getDouble(jpaColumnName);
        case FLOAT:
            return result.getFloat(jpaColumnName);
        case INT16:
            return result.getShort(jpaColumnName);
        case INT32:
            return result.getInt(jpaColumnName);
        case INT64:
            return result.getLong(jpaColumnName);
        case INT8:
            return result.getByte(jpaColumnName);
        case STRING:
            return result.getString(jpaColumnName);
        case UNIXTIME_MICROS:
        default:
            logger.error(jpaColumnName + " type is not supported by Kudu");
            throw new KunderaException(jpaColumnName + " type is not supported by Kudu");

        }
    }
1086545
@Override
	public String formatName(Result result) {
		String formatted;
		JexlContext context = new MapContext();

		this.populateContext(context, result);
		try {
			formatted = (String) this.parsedExpr.evaluate(context);
		} catch (JexlException jexlExc) {
			LOG.error("error applying JEXL expression to query results", jexlExc);
			formatted = null;
		}

		return formatted;
	}
635970
private String readAnnotatedColumnName(AnnotatedElement classMember, boolean isJpaColumnInClasspath) {
        if (isJpaColumnInClasspath) {
            Column columnInformation = classMember.getAnnotation(Column.class);
            if (columnInformation != null && !columnInformation.name().isEmpty()) {
                return columnInformation.name();
            }
        }
        return null;
    }
659816
private List<String> getColumnResults(int columnIndex,
			UserCoreResult<?, ?, ?> results) {

		List<String> values = new ArrayList<>();
		while (results.moveToNext()) {
			values.add(results.getString(columnIndex));
		}

		return values;
	}
841862
private List fetchColumn(String columnName, Object connection, List results, Set<String> resultKeys)
    {
        for (String hashKey : resultKeys)
        {
            List columnValues = null;
            if (resource != null && resource.isActive())
            {
                Response response = ((Transaction) connection).hmget(hashKey, columnName);
                // ((Transaction) connection).exec();
                ((RedisTransaction) resource).onExecute(((Transaction) connection));

                columnValues = (List) response.get();
            }
            else
            {
                columnValues = ((Jedis) connection).hmget(hashKey, columnName);
            }

            if (columnValues != null && !columnValues.isEmpty())
            {
                results.addAll(columnValues); // Currently returning list of
                                              // string as known issue
                                              // with
                                              // joint table concept!
            }

        }

        return results;
    }
1350822
public static String getAnnotationColumnName(AnnotatedElement element) {
        String result = "";
        DatabaseField databaseField = element.getAnnotation(DatabaseField.class);
        if (databaseField != null) {
            result = databaseField.columnName();
            if (TextUtils.isEmpty(result)) {
                result = ((Field) element).getName();
            }
        }
        return result;
    }
1285084
public String getColumn(String pProperty) {
        if (mPropertiesMap == null || pProperty == null)
            return null;
        return (String) mPropertiesMap.get(pProperty);
    }
313413
private List<String> getResultRows(Result<?> result, boolean logResult) {
        List<String> rows = new ArrayList<>();
        if (logResult) {
            for (Map<String, Object> columns : result.getRows()) {
                StringBuilder row = new StringBuilder();
                for (Map.Entry<String, Object> entry : columns.entrySet()) {
                    if (row.length() > 0) {
                        row.append(", ");
                    }
                    row.append(entry.getKey());
                    row.append('=');
                    String stringValue = getLabel(entry.getValue());
                    row.append(stringValue);
                }
                rows.add("  " + row.toString());
            }
        }
        return rows;
    }
803865
public Object get(String columnId) throws CmsIllegalArgumentException {

        if ((getMetadata().getColumnDefinition(columnId) == null)
            && (getMetadata().getItemDetailDefinition(columnId) == null)) {
            throw new CmsIllegalArgumentException(
                Messages.get().container(Messages.ERR_LIST_INVALID_COLUMN_1, columnId));
        }
        return m_values.get(columnId);
    }
282847
public static String getColumnString(Cursor cursor, String columnName) {
        int col = cursor.getColumnIndex(columnName);
        return getStringOrNull(cursor, col);
    }
599161
public Map<String, Object> getMBeanResult(final String mbeanName) {
    final Map<String, Object> ret = new HashMap<>();
    try {
      final ObjectName name = new ObjectName(mbeanName);
      final MBeanInfo info = getMBeanInfo(name);

      final MBeanAttributeInfo[] mbeanAttrs = info.getAttributes();
      final Map<String, Object> attributes = new TreeMap<>();

      for (final MBeanAttributeInfo attrInfo : mbeanAttrs) {
        final Object obj = getMBeanAttribute(name, attrInfo.getName());
        attributes.put(attrInfo.getName(), obj);
      }

      ret.put("attributes", attributes);
    } catch (final Exception e) {
      logger.error("Invalid MBean Name. name = " + mbeanName, e);
      ret.put("error", "'" + mbeanName + "' is not a valid mBean name");
    }

    return ret;
  }
71763
@Override
    public Object getValue(@NonNull String key) {
        if (key == null) { throw new IllegalArgumentException("key cannot be null."); }

        final int index = indexForColumnName(key);
        return index >= 0 ? getValue(index) : null;
    }
968536
protected String getCrid(Map result) {

        HashMap mgnData = getObjectOr(result, "management", new HashMap());
        ArrayList<HashMap> events = getObjectOr(mgnData, "events", new ArrayList());
        String crid = null;
        boolean isPlEventExist = false;
        for (HashMap event : events) {
            if ("planting".equals(event.get("event"))) {
                isPlEventExist = true;
                if (crid == null) {
                    crid = (String) event.get("crid");
                } else if (!crid.equals(event.get("crid"))) {
                    return "SQ";
                }
            }
        }
        if (crid == null) {
            crid = getValueOr(result, "crid", "XX");
        }
        if (!isPlEventExist && "XX".equals(crid)) {
            return "FA";
        } else {
//            DssatCRIDHelper crids = new DssatCRIDHelper();
            return DssatCRIDHelper.get2BitCrid(crid);
        }
    }
1245563
public static <R> MethodResult<R> success(R result) {
        return new MethodResult<>(result, null, false);
    }
449333
public Column getColumn(String columnName) {
    if (columnName == null) {
      return null;
    }
    for (Column column : columns) {
      if (columnName.equals(column.getData())) {
        return column;
      }
    }
    return null;
  }
1283696
List<String> getColumnList(EntityMetadata m, String[] results, EmbeddableType compoundKey)
    {
        List<String> columns = new ArrayList<String>();
        if (results != null && results.length > 0)
        {
            MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                    m.getPersistenceUnit());
            EntityType entity = metaModel.entity(m.getEntityClazz());

            for (int i = 1; i < results.length; i++)
            {
                if (results[i] != null)
                {
                    Attribute attribute = entity.getAttribute(results[i]);

                    if (attribute == null)
                    {
                        throw new QueryHandlerException("column type is null for: " + results);
                    }
                    else if (m.getIdAttribute().equals(attribute) && compoundKey != null)
                    {
                        Field[] fields = m.getIdAttribute().getBindableJavaType().getDeclaredFields();
                        for (Field field : fields)
                        {
                            if (!ReflectUtils.isTransientOrStatic(field))
                            {
                                Attribute compositeColumn = compoundKey.getAttribute(field.getName());
                                columns.add(((AbstractAttribute) compositeColumn).getJPAColumnName());
                            }
                        }
                    }
                    else
                    {
                        columns.add(((AbstractAttribute) attribute).getJPAColumnName());
                    }
                }
            }
            return columns;
        }

        if (log.isInfoEnabled())
        {
            log.info("No record found, returning null.");
        }
        return null;
    }
715546
private Object deserializeOCCColumn(Result result) {
    byte[] versionBytes = result.getValue(Constants.SYS_COL_FAMILY,
        Constants.VERSION_CHECK_COL_QUALIFIER);
    if (versionBytes == null) {
      return null;
    } else {
      return Bytes.toLong(versionBytes);
    }
  }