@@ -0,0 +1,2281 @@
+/*%0A *%0A *  Copyright (c) 2017 Ot%C3%A1vio Santana and others%0A *   All rights reserved. This program and the accompanying materials%0A *   are made available under the terms of the Eclipse Public License v1.0%0A *   and Apache License v2.0 which accompanies this distribution.%0A *   The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html%0A *   and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php.%0A *%0A *   You may elect to redistribute this code under either of these licenses.%0A *%0A *   Contributors:%0A *%0A *   Otavio Santana%0A *%0A */%0A%0Apackage org.jnosql.diana.key;%0A%0Aimport jakarta.nosql.TypeSupplier;%0Aimport jakarta.nosql.Value;%0Aimport jakarta.nosql.key.KeyValueEntity;%0A%0Aimport java.util.Objects;%0A%0A/**%0A * The default implementation of %7B@link KeyValueEntity%7D%0A */%0Afinal class DefaultKeyValueEntity implements KeyValueEntity %7B%0A%0A    private final Object key;%0A%0A    private final Object value;%0A%0A    DefaultKeyValueEntity(Object key, Object value) %7B%0A        this.key = Objects.requireNonNull(key, %22key is required%22);%0A        this.value = Objects.requireNonNull(value, %22value is required%22);%0A    %7D%0A%0A    public Object getKey() %7B%0A        return key;%0A    %7D%0A%0A    @Override%0A    public Object getValue() %7B%0A        return value;%0A    %7D%0A%0A    @Override%0A    public %3CK%3E K getKey(TypeSupplier%3CK%3E typeSupplier) %7B%0A        Objects.requireNonNull(typeSupplier, %22typeSupplier is required%22);%0A        return Value.of(key).get(typeSupplier);%0A    %7D%0A%0A    @Override%0A    public %3CK%3E K getKey(Class%3CK%3E clazz) %7B%0A        Objects.requireNonNull(clazz, %22clazz is required%22);%0A        return Value.of(key).get(clazz);%0A    %7D%0A%0A    @Override%0A    public %3CV%3E V getValue(TypeSupplier%3CV%3E typeSupplier) %7B%0A        Objects.requireNonNull(typeSupplier, %22typeSupplier is required%22);%0A        return Value.of(value).get(typeSupplier);%0A    %7D%0A%0A    @Override%0A    public %3CV%3E V getValue(Class%3CV%3E clazz) %7B%0A        Objects.requireNonNull(clazz, %22clazz is required%22);%0A        return Value.of(value).get(clazz);%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        return Objects.hash(key, value);%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return %22DefaultKeyValueEntity%7B%22 +%0A                %22key=%22 + key +%0A                %22, value=%22 + value +%0A                '%7D';%0A    %7D%0A%7D%0A

update keyvalue entity