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

com.kenshoo.pl.entity.ValidationError Maven / Gradle / Ivy

Go to download

A Java persistence layer based on JOOQ for high performance and business flow support.

There is a newer version: 0.1.121-jooq-3.16.3
Show newest version
package com.kenshoo.pl.entity;

import java.util.Collections;
import java.util.Map;

public class ValidationError {

    private final String errorCode;
    private final EntityField field;
    private final Map parameters;

    public ValidationError(String errorCode) {
        this(errorCode, null, Collections.emptyMap());
    }

    public ValidationError(String errorCode, EntityField field) {
        this(errorCode, field, Collections.emptyMap());
    }

    public ValidationError(String errorCode, Map parameters) {
        this(errorCode, null, parameters);
    }

    public ValidationError(String errorCode, EntityField field, Map parameters) {
        this.errorCode = errorCode;
        this.field = field;
        this.parameters = parameters;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public EntityField getField() {
        return field;
    }

    public Map getParameters() {
        return parameters;
    }

    @Override
    public String toString() {
        return new org.apache.commons.lang3.builder.ToStringBuilder(this)
                .append("errorCode", errorCode)
                .append("errorField", field)
                .append("parameters", parameters)
                .toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy