/** * Creates an update operation, requiring an existing aggregate. * * @param handler The handler to invoke with the current state to apply updates. * @return An operation representing the supplied logic, with metadata. */ public static <TState, TParams, TEvent> Operation<TState, TParams, TEvent> updateOf( final ParameterizedUpdateHandlerSingle<TState, TParams, TEvent> handler) { return updateOf(handler, false); }
/** * Creates an update operation, requiring an existing aggregate. * * @param handler The handler to invoke with the current state to apply updates. * @return An operation representing the supplied logic, with metadata. */ public static <TState, TParams, TEvent> Operation<TState, TParams, TEvent> updateOf( final ParameterizedUpdateHandler<TState, TParams, TEvent> handler) { return updateOf(handler, false); }
/** * Creates an update operation, requiring an existing aggregate. * * @param handler The handler to invoke with the current state to apply updates. * @return An operation representing the supplied logic, with metadata. */ public static <TState, TParams, TEvent> Operation<TState, TParams, TEvent> updateOf( final ParameterizedPojoUpdateHandler<TState, TParams, TEvent> handler) { return updateOf(handler, false); }
/** * Creates an update operation, requiring an existing aggregate. * * @param handler The handler to invoke with the current state to apply updates. * @return An operation representing the supplied logic, with metadata. */ public static <TState, TEvent> Operation<TState, Object, TEvent> updateOf( final UpdateHandler<TState, TEvent> handler) { return updateOf(handler, false); }
/** * Creates an update operation, requiring an existing aggregate. * * @param handler The handler to invoke with the current state to apply updates. * @return An operation representing the supplied logic, with metadata. */ public static <TState, TEvent> Operation<TState, Object, TEvent> updateOf( final PojoUpdateHandler<TState, TEvent> handler) { return updateOf(handler, false); }
/** * Creates an update operation, requiring an existing aggregate. * * @param handler The handler to invoke with the current state to apply updates. * @return An operation representing the supplied logic, with metadata. */ public static <TState, TEvent> Operation<TState, Object, TEvent> updateOf( final UpdateHandlerSingle<TState, TEvent> handler) { return updateOf(handler, false); }
/** * Creates an update operation, requiring an existing aggregate. * * @param handler The handler to invoke with the current state to apply updates. * @return An operation representing the supplied logic, with metadata. */ public static <TState, TEvent> Operation<TState, Object, TEvent> updateOf( final UpdateHandlerAggregate<TState, TEvent> handler) { return updateOf(handler, false); }
/** * Creates an update operation, requiring an existing aggregate. * * @param handler The handler to invoke with the current state to apply updates. * @return An operation representing the supplied logic, with metadata. */ public static <TState, TEvent> Operation<TState, Object, TEvent> updateOf( final UpdateHandler<TState, TEvent> handler) { return updateOf(handler, false); }
/** * Creates an update operation, requiring an existing aggregate. * * @param handler The handler to invoke with the current state to apply updates. * @return An operation representing the supplied logic, with metadata. */ public static <TState, TEvent> Operation<TState, Object, TEvent> updateOf( final UpdateHandlerSingle<TState, TEvent> handler) { return updateOf(handler, false); }
/** * Creates an update operation, requiring an existing aggregate. * * @param handler The handler to invoke with the current state to apply updates. * @return An operation representing the supplied logic, with metadata. */ public static <TState, TEvent> Operation<TState, Object, TEvent> updateOf( final PojoUpdateHandlerSingle<TState, TEvent> handler) { return updateOf(handler, false); }
/** * Creates an update operation, requiring an existing aggregate. * * @param handler The handler to invoke with the current state to apply updates. * @return An operation representing the supplied logic, with metadata. */ public static <TState, TEvent> Operation<TState, Object, TEvent> updateOf( final UpdateHandlerAggregate<TState, TEvent> handler) { return updateOf(handler, false); }
/** * Creates an update operation, requiring an existing aggregate. * * @param handler The handler to invoke with the current state to apply updates. * @return An operation representing the supplied logic, with metadata. */ public static <TState, TParams, TEvent> Operation<TState, TParams, TEvent> updateOf( final ParameterizedPojoUpdateHandlerSingle<TState, TParams, TEvent> handler) { return updateOf(handler, false); }
/** * Creates an update operation, requiring an existing aggregate. * * @param handler The handler to invoke with the current state to apply updates. * @return An operation representing the supplied logic, with metadata. */ public static <TState, TParams, TEvent> Operation<TState, TParams, TEvent> updateOf( final ParameterizedUpdateHandlerSingle<TState, TParams, TEvent> handler) { return updateOf(handler, false); }
/** * Creates an update operation, requiring an existing aggregate. * * @param handler The handler to invoke with the current state to apply updates. * @return An operation representing the supplied logic, with metadata. */ public static <TState, TParams, TEvent> Operation<TState, TParams, TEvent> updateOf( final ParameterizedPojoUpdateHandler<TState, TParams, TEvent> handler) { return updateOf(handler, false); }
@Test public void testUpdateSingleResolved() { Operation<State, Object, Event> operation = Operations.updateOf(this::updateSingle); this.assertHandlerType(operation, UpdateHandlerSingle.class); }
@Test public void testParameterizedUpdateResolved() { Operation<State, Params, Event> operation = Operations.updateOf(this::parameterizedUpdate); this.assertHandlerType(operation, ParameterizedUpdateHandler.class); }
@Test public void testParameterizedUpdateStateResolved() { Operation<State, Params, Event> operation = Operations.updateOf(this::parameterizedUpdateState); this.assertHandlerType(operation, ParameterizedUpdateHandlerAggregate.class); }
@Test public void testUpdateResolved() { Operation<State, Object, Event> operation = Operations.updateOf(this::update); this.assertHandlerType(operation, UpdateHandler.class); }
@Test public void testUpdateStateResolved() { Operation<State, Object, Event> operation = Operations.updateOf(this::updateState); this.assertHandlerType(operation, UpdateHandlerAggregate.class); }
@Test public void testParameterizedUpdateSingleResolved() { Operation<State, Params, Event> operation = Operations.updateOf(this::parameterizedUpdateSingle); this.assertHandlerType(operation, ParameterizedUpdateHandlerSingle.class); }