/*
 *  Copyright (c) 2017 Otávio Santana and others
 *   All rights reserved. This program and the accompanying materials
 *   are made available under the terms of the Eclipse Public License v1.0
 *   and Apache License v2.0 which accompanies this distribution.
 *   The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
 *   and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php.
 *
 *   You may elect to redistribute this code under either of these licenses.
 *
 *   Contributors:
 *
 *   Otavio Santana
 *   Lucas Furlaneto
 */
package org.jnosql.diana.orientdb.document;

import org.jnosql.diana.api.document.DocumentEntity;

public final class OrientDBLiveCallbackBuilder {
    private OrientDBLiveCreateCallback<DocumentEntity> createCallback;
    private OrientDBLiveUpdateCallback<DocumentEntity> updateCallback;
    private OrientDBLiveDeleteCallback<DocumentEntity> deleteCallback;

    private OrientDBLiveCallbackBuilder() {
    }

    public static OrientDBLiveCallbackBuilder builder() {
        return new OrientDBLiveCallbackBuilder();
    }

    public OrientDBLiveCallbackBuilder onCreate(OrientDBLiveCreateCallback<DocumentEntity> createCallback) {
        this.createCallback = createCallback;
        return this;
    }

    public OrientDBLiveCallbackBuilder onUpdate(OrientDBLiveUpdateCallback<DocumentEntity> updateCallback) {
        this.updateCallback = updateCallback;
        return this;
    }

    public OrientDBLiveCallbackBuilder onDelete(OrientDBLiveDeleteCallback<DocumentEntity> deleteCallback) {
        this.deleteCallback = deleteCallback;
        return this;
    }

    public OrientDBLiveCallback build() {
        return new OrientDBLiveCallback(createCallback, updateCallback, deleteCallback);
    }
}
@@ -694,16 +694,65 @@
 ntity;%0A%0A
+import static java.util.Objects.requireNonNull;%0A%0A
 public f
@@ -1273,32 +1273,102 @@
 eateCallback) %7B%0A
+        requireNonNull(createCallback, %22createCallback is required%22);%0A
         this.cre
@@ -1526,32 +1526,102 @@
 dateCallback) %7B%0A
+        requireNonNull(updateCallback, %22updateCallback is required%22);%0A
         this.upd
@@ -1670,32 +1670,32 @@
 rn this;%0A    %7D%0A%0A
-
     public Orien
@@ -1779,32 +1779,102 @@
 leteCallback) %7B%0A
+        requireNonNull(deleteCallback, %22deleteCallback is required%22);%0A
         this.del

Add check non null on builder methods