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

com.kenshoo.pl.entity.EntityChangeResult 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 com.google.common.collect.ImmutableList;

import java.util.Collection;
import java.util.Collections;

public abstract class EntityChangeResult, ID extends Identifier, C extends ChangeEntityCommand> {

    private final C command;
    private final Collection errors;

    public EntityChangeResult(C command) {
        this(command, Collections.emptyList());
    }

    public EntityChangeResult(C command, Iterable errors) {
        this.command = command;
        this.errors = ImmutableList.copyOf(errors);
    }

    public C getCommand() {
        return command;
    }

    public boolean isSuccess() {
        return errors.isEmpty();
    }

    public Collection getErrors() {
        return errors;
    }

    public abstract ID getIdentifier();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy