/*
 * Copyright 2012 Shared Learning Collaborative, LLC
 *
 * 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 org.slc.sli.ingestion.model;

/**
 * Model for ingestion file entries
 *
 * @author dduran
 *
 */
public final class ResourceEntry {

    private String resourceId;

    private String resourceName;

    private String resourceFormat;

    private String resourceType;

    private String externallyUploadedResourceId;

    private String checksum;

    private String topLevelLandingZonePath;

    private int recordCount;

    private int errorCount;

    // mongoTemplate requires this constructor.
    public ResourceEntry() {
    }

    public void update(String fileFormat, String fileType, String checksum, int recordCount, int errorCount) {
        if (fileFormat != null) {
            this.resourceFormat = fileFormat;
        }
        if (fileType != null) {
            this.resourceType = fileType;
        }
        if (checksum != null) {
            this.checksum = checksum;
        }
        this.recordCount = recordCount;
        this.errorCount = errorCount;
    }

    public String getResourceId() {
        return resourceId;
    }

    public String getResourceName() {
        return resourceName;
    }

    public void setResourceName(String resourceName) {
        this.resourceName = resourceName;
    }

    public void setResourceId(String resourceId) {
        this.resourceId = resourceId;
    }

    public String getResourceFormat() {
        return resourceFormat;
    }

    public void setResourceFormat(String resourceFormat) {
        this.resourceFormat = resourceFormat;
    }

    public String getResourceType() {
        return resourceType;
    }

    public void setResourceType(String resourceType) {
        this.resourceType = resourceType;
    }

    public String getChecksum() {
        return checksum;
    }

    public void setChecksum(String checksum) {
        this.checksum = checksum;
    }

    public String getTopLevelLandingZonePath() {
        return topLevelLandingZonePath;
    }

    public void setTopLevelLandingZonePath(String topLevelLandingZone) {
        this.topLevelLandingZonePath = topLevelLandingZone;
    }

    public int getRecordCount() {
        return recordCount;
    }

    public void setRecordCount(int recordCount) {
        this.recordCount = recordCount;
    }

    public int getErrorCount() {
        return errorCount;
    }

    public void setErrorCount(int errorCount) {
        this.errorCount = errorCount;
    }

    /**
     * @return the externallyUploadedResourceId
     */
    public String getExternallyUploadedResourceId() {
        return externallyUploadedResourceId;
    }

    /**
     * @param externallyUploadedResourceId the externallyUploadedResourceId to set
     */
    public void setExternallyUploadedResourceId(String externallyUploadedResourceId) {
        this.externallyUploadedResourceId = externallyUploadedResourceId;
    }
}

@@ -1024,19 +1024,20 @@
 private 
-int
+long
  recordC
@@ -1055,19 +1055,20 @@
 private 
-int
+long
  errorCo
@@ -2716,27 +2716,28 @@
 %0A    public 
-int
+long
  getRecordCo
@@ -2810,19 +2810,20 @@
 rdCount(
-int
+long
  recordC
@@ -2888,19 +2888,20 @@
  public 
-int
+long
  getErro
@@ -2975,19 +2975,20 @@
 orCount(
-int
+long
  errorCo

change record and error count in resource entry from int to long