@Override protected Key getValue(com.google.datastore.v1.Value from) { return Key.fromPb(from.getKeyValue()); }
case 5: hash = (37 * hash) + KEY_VALUE_FIELD_NUMBER; hash = (53 * hash) + getKeyValue().hashCode(); break; case 17:
break; case 5: result = result && getKeyValue().equals(other.getKeyValue()); break; case 17:
mergeKeyValue(other.getKeyValue()); break;
/** * Check if value is a key. * * @return {@code true} if value is a key. */ public boolean isKey() { return value.getKeyValue() != null; }
/** * @return the key contained in value * @throws IllegalArgumentException if the value does not contain a key. */ public static Key getKey(Value value) { if (value.getValueTypeCase() != ValueTypeCase.KEY_VALUE) { throw new IllegalArgumentException("Value does not contain a key."); } return value.getKeyValue(); }
/** * @return the key contained in value * @throws IllegalArgumentException if the value does not contain a key. */ public static Key getKey(Value value) { if (value.getValueTypeCase() != ValueTypeCase.KEY_VALUE) { throw new IllegalArgumentException("Value does not contain a key."); } return value.getKeyValue(); }
@Override protected Key getValue(com.google.datastore.v1.Value from) { return Key.fromPb(from.getKeyValue()); }
/** * Return the value as a {@code Key}. * * @return the value. * @throws IllegalArgumentException if {@code Value} is not a key. */ public Key getKey() { final com.google.datastore.v1.Key key = value.getKeyValue(); if (key == null) { throw new IllegalArgumentException("Value does not contain an key."); } return Key.builder(key).build(); }
com.google.datastore.v1.Value getPb(final String namespace) { final com.google.datastore.v1.Key key = value.getKeyValue(); if (key.getPathCount() > 0) { return com.google.datastore.v1.Value. newBuilder(value) .setKeyValue(getKey().getPb(namespace)).build(); } return value; }
case 5: hash = (37 * hash) + KEY_VALUE_FIELD_NUMBER; hash = (53 * hash) + getKeyValue().hashCode(); break; case 17:
case 5: hash = (37 * hash) + KEY_VALUE_FIELD_NUMBER; hash = (53 * hash) + getKeyValue().hashCode(); break; case 17:
break; case 5: result = result && getKeyValue().equals(other.getKeyValue()); break; case 17:
break; case 5: result = result && getKeyValue() .equals(other.getKeyValue()); break; case 17:
mergeKeyValue(other.getKeyValue()); break;
mergeKeyValue(other.getKeyValue()); break;