@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getValueCount() > 0) { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValueList().hashCode(); } if (getArrayValueCount() > 0) { hash = (37 * hash) + ARRAY_VALUE_FIELD_NUMBER; hash = (53 * hash) + getArrayValueList().hashCode(); } hash = (37 * hash) + HAS_ARRAY_VALUE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getHasArrayValue()); if (hasScalarValue()) { hash = (37 * hash) + SCALAR_VALUE_FIELD_NUMBER; hash = (53 * hash) + getScalarValue().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getValueCount() > 0) { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValueList().hashCode(); } if (getArrayValueCount() > 0) { hash = (37 * hash) + ARRAY_VALUE_FIELD_NUMBER; hash = (53 * hash) + getArrayValueList().hashCode(); } hash = (37 * hash) + HAS_ARRAY_VALUE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getHasArrayValue()); if (hasScalarValue()) { hash = (37 * hash) + SCALAR_VALUE_FIELD_NUMBER; hash = (53 * hash) + getScalarValue().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * Parses the value for a ColumnValue using the separated array and scalar attributes. * * @param column The protobuf ColumnValue object * @return The parse value for this column */ static Object parseColumn(Common.ColumnValue column) { // Verify that we have one or the other (scalar or array) validateColumnValue(column); if (!column.hasField(SCALAR_VALUE_DESCRIPTOR)) { // The column in this row is an Array (has multiple values) List<Object> array = new ArrayList<>(column.getArrayValueCount()); for (Common.TypedValue arrayValue : column.getArrayValueList()) { // Duplicative because of the ColumnValue/TypedValue difference. if (Common.Rep.ARRAY == arrayValue.getType()) { // Each element in this Array is an Array. array.add(parseArray(arrayValue)); } else { // The array element is a scalar. array.add(deserializeScalarValue(arrayValue)); } } return array; } else { // Scalar return deserializeScalarValue(column.getScalarValue()); } }
/** * Parses the value for a ColumnValue using the separated array and scalar attributes. * * @param column The protobuf ColumnValue object * @return The parse value for this column */ static Object parseColumn(Common.ColumnValue column) { // Verify that we have one or the other (scalar or array) validateColumnValue(column); if (!column.hasField(SCALAR_VALUE_DESCRIPTOR)) { // The column in this row is an Array (has multiple values) List<Object> array = new ArrayList<>(column.getArrayValueCount()); for (Common.TypedValue arrayValue : column.getArrayValueList()) { // Duplicative because of the ColumnValue/TypedValue difference. if (Common.Rep.ARRAY == arrayValue.getType()) { // Each element in this Array is an Array. array.add(parseArray(arrayValue)); } else { // The array element is a scalar. array.add(deserializeScalarValue(arrayValue)); } } return array; } else { // Scalar return deserializeScalarValue(column.getScalarValue()); } }
/** * Parses the value for a ColumnValue using the separated array and scalar attributes. * * @param column The protobuf ColumnValue object * @return The parse value for this column */ static Object parseColumn(Common.ColumnValue column) { // Verify that we have one or the other (scalar or array) validateColumnValue(column); if (!ProtobufService.hasField(column, column.getDescriptorForType(), Common.ColumnValue.SCALAR_VALUE_FIELD_NUMBER)) { // Array List<Object> array = new ArrayList<>(column.getArrayValueCount()); for (Common.TypedValue arrayValue : column.getArrayValueList()) { array.add(getScalarValue(arrayValue)); } return array; } else { // Scalar return getScalarValue(column.getScalarValue()); } }