com.googlecode.jpattern.shared.command
Class ABaseCommand

java.lang.Object
  extended by com.googlecode.jpattern.shared.command.ABaseCommand
All Implemented Interfaces:
IBaseCommand, Serializable

public abstract class ABaseCommand
extends Object
implements IBaseCommand

Author:
Francesco Cina' 29/gen/2011 A simple implentation of the Command pattern. This class doesn't catch exeption thrown during the execution, neither automatically launch the rollback in case of error, the user is in charge of all those actions.
See Also:
Serialized Form

Constructor Summary
ABaseCommand(IBaseCommand previousCommand)
           
 
Method Summary
 IBaseCommandResult exec()
           
protected abstract  void internalRollBack(IBaseCommandResult rollBackResult)
           
protected abstract  void result(IBaseCommandResult result)
           
 IBaseCommandResult rollback()
           
 IBaseCommandResult rollback(IBaseCommandResult execResult)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ABaseCommand

public ABaseCommand(IBaseCommand previousCommand)
Method Detail

exec

public final IBaseCommandResult exec()
Specified by:
exec in interface IBaseCommand

rollback

public final IBaseCommandResult rollback(IBaseCommandResult execResult)
Specified by:
rollback in interface IBaseCommand

rollback

public final IBaseCommandResult rollback()
Specified by:
rollback in interface IBaseCommand

result

protected abstract void result(IBaseCommandResult result)

internalRollBack

protected abstract void internalRollBack(IBaseCommandResult rollBackResult)


Copyright © 2011. All Rights Reserved.