com.googlecode.jpattern.shared.result.facade.CommandFacadeResult Maven / Gradle / Ivy
package com.googlecode.jpattern.shared.result.facade;
import java.util.List;
import com.googlecode.jpattern.shared.result.IErrorMessage;
import com.googlecode.jpattern.shared.result.IResult;
/**
*
* @author Francesco Cina'
*
* 25 Feb 2011
*/
public class CommandFacadeResult implements ICommandFacadeResult {
private static final long serialVersionUID = 1L;
private IResult result;
private E returnedObject;
public CommandFacadeResult(IResult aResult, E returnedObject) {
result = aResult;
this.returnedObject = returnedObject;
}
@Override
public List getErrorMessages() {
return result.getErrorMessages();
}
public boolean isValid() {
return getErrorMessages().isEmpty();
}
@Override
public E getReturnedObject() {
return returnedObject;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy