All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hisp.dhis.response.object.ObjectReport Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
package org.hisp.dhis.response.object;

import java.util.ArrayList;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import com.fasterxml.jackson.annotation.JsonProperty;

@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class ObjectReport
{
    @JsonProperty
    private String klass;

    @JsonProperty
    private String uid;

    @JsonProperty
    private List errorReports = new ArrayList<>();

    /**
     * Alias for UID.
     *
     * @return the identifier.
     */
    public String getId()
    {
        return uid;
    }

    /**
     * Returns the number of errors.
     *
     * @return the number of errors.
     */
    public int getErrorCount()
    {
        return errorReports != null ? errorReports.size() : 0;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy