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

net.n2oapp.framework.config.reader.ReferentialIntegrityViolationException Maven / Gradle / Ivy

There is a newer version: 7.28.2
Show newest version
package net.n2oapp.framework.config.reader;

import net.n2oapp.framework.api.exception.N2oException;
import net.n2oapp.framework.api.metadata.SourceMetadata;
import net.n2oapp.framework.config.register.ConfigId;

/**
 * Исключение, метаданная не найдена
 */
public class ReferentialIntegrityViolationException extends N2oException {

    private String id;
    private Class metadataClass;

    public ReferentialIntegrityViolationException(ConfigId configId) {
        super("[" + configId + "] not found");
        this.id = configId.getId();
        this.metadataClass = configId.getBaseSourceClass();
    }

    public ReferentialIntegrityViolationException(String id, Class metadataClass) {
        super("[" + id + "." + metadataClass.getSimpleName() + "] not found");
        this.id = id;
        this.metadataClass = metadataClass;
    }

    public String getId() {
        return id;
    }

    public Class getMetadataClass() {
        return metadataClass;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy