@@ -0,0 +1,2521 @@
+/*%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 *   Lucas Furlaneto%0A */%0Apackage org.jnosql.artemis.orientdb.document;%0A%0Aimport org.jnosql.diana.orientdb.document.OrientDBLiveCallback;%0Aimport org.jnosql.diana.orientdb.document.OrientDBLiveCreateCallback;%0Aimport org.jnosql.diana.orientdb.document.OrientDBLiveDeleteCallback;%0Aimport org.jnosql.diana.orientdb.document.OrientDBLiveUpdateCallback;%0A%0Aimport static java.util.Objects.requireNonNull;%0A%0Apublic final class OrientDBLiveCallbackBuilder %7B%0A    private OrientDBLiveCreateCallback createCallback;%0A    private OrientDBLiveUpdateCallback updateCallback;%0A    private OrientDBLiveDeleteCallback deleteCallback;%0A%0A    private OrientDBLiveCallbackBuilder() %7B%0A    %7D%0A%0A    public static OrientDBLiveCallbackBuilder builder() %7B%0A        return new OrientDBLiveCallbackBuilder();%0A    %7D%0A%0A    public %3CT%3E OrientDBLiveCallbackBuilder onCreate(OrientDBLiveCreateCallback%3CT%3E createCallback) %7B%0A        requireNonNull(createCallback, %22createCallback is required%22);%0A        this.createCallback = createCallback;%0A        return this;%0A    %7D%0A%0A    public %3CT%3E OrientDBLiveCallbackBuilder onUpdate(OrientDBLiveUpdateCallback%3CT%3E updateCallback) %7B%0A        requireNonNull(updateCallback, %22updateCallback is required%22);%0A        this.updateCallback = updateCallback;%0A        return this;%0A    %7D%0A%0A    public %3CT%3E OrientDBLiveCallbackBuilder onDelete(OrientDBLiveDeleteCallback%3CT%3E deleteCallback) %7B%0A        requireNonNull(deleteCallback, %22deleteCallback is required%22);%0A        this.deleteCallback = deleteCallback;%0A        return this;%0A    %7D%0A%0A    public OrientDBLiveCallback build() %7B%0A        validateNonNullCallbacks();%0A        return new OrientDBLiveCallback(createCallback, updateCallback, deleteCallback);%0A    %7D%0A%0A    private void validateNonNullCallbacks() %7B%0A        if (createCallback == null && updateCallback == null && deleteCallback == null) %7B%0A            throw new IllegalArgumentException(%22At least one callback is required on OrientDB Live Query%22);%0A        %7D%0A    %7D%0A%7D

Add live callback builder