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

com.kenshoo.pl.simulation.internal.ActualSuccess 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.simulation.internal;

import com.kenshoo.pl.entity.Entity;
import com.kenshoo.pl.entity.EntityField;
import java.util.Objects;


public class ActualSuccess implements ActualResult {

    final Entity stateBefore;
    final Entity stateAfter;

    public ActualSuccess(Entity stateBefore, Entity stateAfter) {
        this.stateBefore = stateBefore;
        this.stateAfter = stateAfter;
    }

    @Override
    public boolean isSuccess() {
        return true;
    }

    @Override
    public boolean isReallyChanged(EntityField field) {
        return !Objects.equals(stateBefore.get(field), stateAfter.get(field));
    }

    @Override
    public Object getFinalValue(EntityField field) {
        return stateAfter.get(field);
    }

    @Override
    public String getErrorDescription() {
        return null;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy