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

org.odata4j.command.CommandExecution Maven / Gradle / Ivy

The newest version!
package org.odata4j.command;

public interface CommandExecution {

  >
      void execute(TCommand command, TContext context) throws Exception;

  public final CommandExecution DEFAULT = new CommandExecution() {

    @Override
    public > void execute(TCommand command, TContext context) throws Exception {
      if (command instanceof FilterCommand) {
        try {
          command.execute(context);
        } catch (Exception e) {
          FilterCommand filterCommand = (FilterCommand) command;
          FilterResult postProcessResult = filterCommand.postProcess(context, e);
          if (postProcessResult != FilterResult.HANDLED) {
            throw e;
          }
        }
      } else {
        command.execute(context);
      }
    }
  };

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy