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

org.openlca.proto.io.input.ImportStatus Maven / Gradle / Ivy

There is a newer version: 2.4.0
Show newest version
package org.openlca.proto.io.input;

import java.util.Objects;

import org.openlca.core.model.RootEntity;

public record ImportStatus(
	T model, Status status, String error) {

	public enum Status {
		CREATED, UPDATED, SKIPPED, ERROR
	}

	public ImportStatus(T model, Status status, String error) {
		this.model = model;
		this.status = Objects.requireNonNull(status);
		this.error = error;
	}

	public boolean isCreated() {
		return status == Status.CREATED;
	}

	public boolean isUpdated() {
		return status == Status.UPDATED;
	}

	public boolean isSkipped() {
		return status == Status.SKIPPED;
	}

	public boolean isError() {
		return status == Status.ERROR;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy