<commit_before>//
// ReplicatedDocument.java
//
// Copyright (c) 2018 Couchbase, Inc All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package com.couchbase.lite;

import com.couchbase.litecore.C4Error;

public final class ReplicatedDocument {

    //---------------------------------------------
    // member variables
    //---------------------------------------------
    private boolean isDeleted = false;
    private boolean isAccessRemoved = false;
    private String id = "";
    private String revId = "";
    private C4Error error;
    private boolean trans;

    //---------------------------------------------
    // Constructors
    //---------------------------------------------
    ReplicatedDocument(boolean isDeleted, boolean isAccessRemoved, String id, String revId, C4Error error, boolean trans) {
        this.id = id;
        this.isDeleted = isDeleted;
        this.isAccessRemoved = isAccessRemoved;
        this.revId = revId;
        this.error = error;
        this.trans = trans;
    }

    //---------------------------------------------
    // API - public methods
    //---------------------------------------------

    /**
     * The current document id.
     */
    public String getID() {
        return id;
    }

    /**
     * The current deleted status of the document.
     */
    public boolean isDeleted() {
        return isDeleted;
    }

    /**
     * The current access removed status of the document.
     */
    public boolean isAccessRemoved()  {
        return isAccessRemoved;
    }

    /**
     * The current document replication error.
     */
    public CouchbaseLiteException getError() {
        return error.getCode() != 0 ? CBLStatus.convertError(error) : null;
    }
   
    /**
     * The clear document replication error.
     */
    public ReplicatedDocument clearError() {
        return new ReplicatedDocument(isAccessRemoved, isDeleted, id, revId, new C4Error(), trans);
    }
<commit_msg>Replication eventing update: remove clearError method from replicated document class.<commit_after>//
// ReplicatedDocument.java
//
// Copyright (c) 2018 Couchbase, Inc All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package com.couchbase.lite;

import com.couchbase.litecore.C4Error;

public final class ReplicatedDocument {

    //---------------------------------------------
    // member variables
    //---------------------------------------------
    private boolean isDeleted = false;
    private boolean isAccessRemoved = false;
    private String id = "";
    private String revId = "";
    private C4Error error;
    private boolean trans;

    //---------------------------------------------
    // Constructors
    //---------------------------------------------
    ReplicatedDocument(boolean isDeleted, boolean isAccessRemoved, String id, String revId, C4Error error, boolean trans) {
        this.id = id;
        this.isDeleted = isDeleted;
        this.isAccessRemoved = isAccessRemoved;
        this.revId = revId;
        this.error = error;
        this.trans = trans;
    }

    //---------------------------------------------
    // API - public methods
    //---------------------------------------------

    /**
     * The current document id.
     */
    public String getID() {
        return id;
    }

    /**
     * The current deleted status of the document.
     */
    public boolean isDeleted() {
        return isDeleted;
    }

    /**
     * The current access removed status of the document.
     */
    public boolean isAccessRemoved()  {
        return isAccessRemoved;
    }

    /**
     * The current document replication error.
     */
    public CouchbaseLiteException getError() {
        return error.getCode() != 0 ? CBLStatus.convertError(error) : null;
    }

{'fraction_non_alphanumeric': 0.19614747307373653, 'fraction_numerical': 0.0051781275890637945, 'mean_word_length': 1.6798002219755828, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2652263', 'n_tokens_mistral': 1192, 'n_tokens_neox': 1172, 'n_words': 412}